react-native-honeywell-barcode-scanner
Installation
$ npm install react-native-honeywell-barcode-scanner --save
Android (iOS not supported)
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNHoneywellBarcodeScannerPackage;
to the imports at the top of the file - Add
new RNHoneywellBarcodeScannerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ":react-native-honeywell-barcode-scanner" project( ":react-native-honeywell-barcode-scanner" ).projectDir = new File( rootProject.projectDir, "../node_modules/react-native-honeywell-barcode-scanner/android" )
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project( ":react-native-honeywell-barcode-scanner" )
More configuration:
-
Append the following line to
android/settings.gradle
:include ":DataCollection"
-
Cut
DataCollection
folder and paste in inandroid
-
Open up
AndroidManifest.xml
and settools:node
value toreplace
:......
Usage
; /* Starts the barcode reader. */; /* Stops the barcode reader. */; /* Listens to the barcode sensor reader event. */; /* Removes the barcode sensor listener. */; /* Sets the barcode reader's mode to manual. */; /* Sets the barcode reader's mode to automatic. */;