$ npm install react-native-honnywell --save
$ react-native link react-native-honnywell
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import nl.kega.RNHonnywellPackage;
to the imports at the top of the file - Add
new RNHonnywellPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-honnywell' project(':react-native-honnywell').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-honnywell/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-honnywell')
import { BarcodeScanner, Barcodes } from 'react-native-honnywell';
BarcodeScanner.claim((data) => {
});