Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Android Barcode scanning #370

Closed
wants to merge 1 commit into from
Closed

Android Barcode scanning #370

wants to merge 1 commit into from

Conversation

fbacker
Copy link

@fbacker fbacker commented Aug 16, 2016

Added barcode scanner with zxing for Android.

Added barcode scanner with zxing for Android.
@chirag04
Copy link
Contributor

cc @rt2zz

@fbacker fbacker mentioned this pull request Aug 18, 2016
@jqn
Copy link

jqn commented Aug 19, 2016

@fbacker Hi, I was wondering if this makes onBarCodeRead work on Android.

@fbacker
Copy link
Author

fbacker commented Aug 21, 2016

Yes it will.
zxing is slower than iOS scanner so using showViewFinder={true} will make the scanner only search inside the rectangle.

Example for searching datamatrix for ios & android

<Camera
  type={this.state.cameraType}
  captureAudio={false}
  captureTarget={this.cameraTypeParsed}
  captureQuality={this.state.quality}
  style={styles.camera}

  torchMode={this.torchModeParsed}
  showViewFinder={true}
  onBarCodeRead={this.barcodeReceived.bind(this)}
  barCodeTypes={['org.iso.DataMatrix,DATA_MATRIX']}
/>

Mostly force pushed this code to make barcode scanner on android it work in my project.
An overhaul should be made so that everything worked exactly the same on Android and iOS.

Barcode types on android
MAXICODE
CODABAR
AZTEC
RSS_EXPANDED
ITF
QR_CODE
UPC_EAN_EXTENSION
CODE_39
CODE_128
EAN_8
UPC_E
CODE_93
PDF_417
UPC_A
DATA_MATRIX
RSS_14
EAN_13

@fbacker
Copy link
Author

fbacker commented Aug 21, 2016

Check #373 instead

@fbacker fbacker closed this Aug 21, 2016
@fbacker fbacker deleted the android-barcode branch August 23, 2016 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants