Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component to scan a driver's license barcode #23

Open
cormander opened this issue Aug 13, 2019 · 0 comments
Open

Component to scan a driver's license barcode #23

cormander opened this issue Aug 13, 2019 · 0 comments

Comments

@cormander
Copy link

As a canvasser I want to be able to scan a driver's license barcode so that data from it can be used to pre-fill fields or be used to verify information so we can implement features such as easy voter registration and voter record validation.

This feature is done when:

  • A data type of something name like "id scan" exists and when selected, opens the camera and scans for a driver's license barcode
  • The data from the barcode is available to be consumed by a callback function.

Proof-of-concept code uses these libraries:

import { RNCamera } from 'react-native-camera';
import { parse } from 'parse-usdl';

And references the components to capture / parse data like so:

  <RNCamera
    ref={ref => {this.camera = ref;}}
    style={{
      flex: 1,
      justifyContent: 'space-between',
    }}
    androidCameraPermissionOptions={{
      title: 'Permission to use camera',
      message: 'We need your permission to use your camera',
      buttonPositive: 'Ok',
      buttonNegative: 'Cancel',
    }}
    onBarCodeRead={(e) => console.warn(parse(e.data))}
    barCodeTypes={[RNCamera.Constants.BarCodeType.pdf417]}
  >
cormander pushed a commit that referenced this issue Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant