WIP - only android so far
$ npm install react-native-zebra-scanner --save
$ react-native link react-native-zebra-scanner
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.zebrascanner.ZebraScannerPackage;
to the imports at the top of the file - Add
new ZebraScannerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-zebra-scanner' project(':react-native-zebra-scanner').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zebra-scanner/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-zebra-scanner')
import Zebra from 'react-native-zebra-scanner';
// TODO: What to do with the module?
Zebra;