react-native-pm-scanner-library
Getting started
$ npm install react-native-pm-scanner-library --save
Mostly automatic installation
$ react-native link react-native-pm-scanner-library
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNPmScannerLibraryPackage;
to the imports at the top of the file - Add
new RNPmScannerLibraryPackage()
to the list returned by the getPackages()
method
- Append the following lines to
android/settings.gradle
:
include ':react-native-pm-scanner-library'
project(':react-native-pm-scanner-library').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pm-scanner-library/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:
compile project(':react-native-pm-scanner-library')
Usage
import RNPmScannerLibrary from 'react-native-pm-scanner-library';
RNPmScannerLibrary;