• This repository has been archived on 11/Dec/2018
  • Stars
    star
    250
  • Rank 162,397 (Top 4 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated over 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,530
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
193
star
4

trix-extensions

Trix Extensions
JavaScript
193
star
5

administration-zero

An administration system generator for Rails applications.
HTML
107
star
6

react-native-date-range-picker

Simple date range picker extended from react-native-calendars
JavaScript
105
star
7

turbo-native-initializer

Turbo IOS/Android project generator
Swift
80
star
8

css-zero

An opinionated CSS starter kit for your "nobuild" application
CSS
61
star
9

sass-zero

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

react-native-turbo

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

strada-rails

Use Strada in your Ruby on Rails app
Ruby
28
star
12

rinha_de_backend

Ruby
23
star
13

css-properties-counter

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

active-persistence

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

stimulus-web-authn

JavaScript
13
star
16

corona-prophet

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

jsf-perfect-crud

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

documentation-zero

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

prime-rails

prime-rails
CSS
7
star
20

react-native-turbo-poc

Objective-C
5
star
21

react-native-form-sheet

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

prime-rails-showcase

Prime-Rails Showcase
JavaScript
1
star
23

primefaces-mobile

JavaScript
1
star
24

all-hallows-eve-theme

Atom All Hallows Eve Theme
CSS
1
star
25

ksroute-csv

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

lazaronixon-web-programming-exercise

Ruby
1
star
27

rinha-de-backend-2

Ruby
1
star