1.0.0 • Published 4 years ago

react-native-sunmi-print v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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

  1. 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 the getPackages() method
  1. 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')
  2. 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;