react-native-sunmi-print
v1.0.0
Published
React Native Library for SUNMI Inner Printer
Downloads
1
Maintainers
Readme
react-native-sunmi-printer
Getting started
$ npm install react-native-sunmi-printer --save
Mostly automatic installation
$ react-native link react-native-sunmi-printer
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.hendrysetiadi.reactnative.sunmiprinter.RNSunmiPrinterPackage;
to the imports at the top of the file - Add
new RNSunmiPrinterPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-sunmi-printer' project(':react-native-sunmi-printer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sunmi-printer/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-sunmi-printer')
Usage
import RNSunmiPrinter from 'react-native-sunmi-printer';
// TODO: What to do with the module?
RNSunmiPrinter;