• This repository has been archived on 11/Dec/2018
  • Stars
    star
    251
  • Rank 155,978 (Top 4 %)
  • Language
    JavaScript
  • Created about 9 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

react-native-qrcode-reader

A simple QR Code Reader Screen implemented with react-native-camera.

qrcode-reader

Getting started

  1. Install react-native-camera.
  2. Copy QRCodeScreen.js to your project.

Usage

'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TouchableOpacity,
  NavigatorIOS,
} = React;

var QRCodeScreen = require('./QRCodeScreen');

var cameraApp = React.createClass({
  render: function() {
    return (
      <NavigatorIOS
        style={styles.container}
        initialRoute={{
          title: 'Index',
          backButtonTitle: 'Back',
          component: Index,
        }}
      />
    );
  }
});

var Index = React.createClass({

  render: function() {
    return (
      <View style={styles.contentContainer}>
        <TouchableOpacity onPress={this._onPressQRCode}>
          <Text>Read QRCode</Text>
        </TouchableOpacity>
      </View>
    );
  },

  _onPressQRCode: function() {
    this.props.navigator.push({
      component: QRCodeScreen,
      title: 'QRCode',
      passProps: {
        onSucess: this._onSucess,
      },
    });
  },

  _onSucess: function(result) {
    console.log(result);
  },

});

var styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#F5FCFF',
  },
  contentContainer: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  }
});

AppRegistry.registerComponent('cameraApp', () => cameraApp);

Properties

cancelButtonVisible

Values: true, false (default)

Use the cancelButtonVisible property to display or hidden cancel button on bottom of view.

cancelButtonTitle

Value: Cancel (default)

Use the cancelButtonTitle property to change text of button cancel.

onSucess

Will call the specified method when a barcode is detected in the camera's view. Event contains a string with the barcode.

onCancel

Will call the specified method when cancel button was pressed.

More Repositories

1

authentication-zero

An authentication system generator for Rails applications.
Ruby
1,300
star
2

the_construct

A Modern Rails Template
CSS
214
star
3

react-native-turbolinks

React Native adapter for building hybrid apps with Turbolinks 5
Java
194
star
4

trix-extensions

Trix Extensions
JavaScript
179
star
5

react-native-date-range-picker

Simple date range picker extended from react-native-calendars
JavaScript
101
star
6

administration-zero

An administration system generator for Rails applications.
HTML
101
star
7

turbo-native-initializer

Turbo IOS/Android project generator
Swift
70
star
8

sass-zero

A CSS framework for custom UI development. (Ruby on Rails)
SCSS
39
star
9

react-native-turbo

React Native framework for making Turbo native apps
Objective-C
28
star
10

strada-rails

Use Strada in your Ruby on Rails app
Ruby
25
star
11

rinha_de_backend

Ruby
22
star
12

css-properties-counter

The 35 CSS properties you must know to do 80% of the work.
CSS
20
star
13

active-persistence

Active Persistence is a implementation of Active Record Query Interface for JPA that makes it easy and fun.
Java
15
star
14

corona-prophet

Profeta do corona - Using facebook prophet to predict corona vírus
Ruby
11
star
15

jsf-perfect-crud

A modern and sofisticated start template for JSF/JAVAEE
Java
10
star
16

stimulus-web-authn

JavaScript
9
star
17

documentation-zero

A rest api documentation generator for rails applications using markdown
Ruby
9
star
18

prime-rails

prime-rails
CSS
8
star
19

react-native-turbo-poc

Objective-C
5
star
20

react-native-form-sheet

Native dialog solution for React Native
Objective-C
2
star
21

primefaces-mobile

JavaScript
1
star
22

prime-rails-showcase

Prime-Rails Showcase
JavaScript
1
star
23

all-hallows-eve-theme

Atom All Hallows Eve Theme
CSS
1
star
24

ksroute-csv

Integração do Ksroute por arquivos csv
Java
1
star
25

rinha-de-backend-2

Ruby
1
star