rn-printer
v1.0.12-2.4
Published
## Getting started
Downloads
6
Readme
rn-printer
Getting started
$ npm install rn-printer --save
Mostly automatic installation
$ react-native link rn-printer
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.sanpyaelin.printer.RNPrinterPackage;
to the imports at the top of the file - Add
new RNPrinterPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':rn-printer' project(':rn-printer').projectDir = new File(rootProject.projectDir, '../node_modules/rn-printer/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':rn-printer')
Usage
import {USBPrinter} from 'rn-printer';
// TODO: What to do with the module?
RNPrinter;