1.2.1 • Published 8 months ago

react-native-sunmi-devices v1.2.1

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
8 months ago

Installation:

Step 1.

install with npm: Check in NPM

npm install react-native-sunmi-inner-printer --save

or you may need to install via the clone address directly:

npm install https://github.com/januslo/react-native-sunmi-inner-printer.git --save

Step 2:

Links this plugin to your project.

react-native link react-native-sunmi-inner-printer

or you may need to link manually

  • modify settings.gradle
include ':react-native-sunmi-inner-printer'
project(':react-native-sunmi-inner-printer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sunmi-inner-printer/android')
  • modify app/build.gradle,add dependenceie:
compile project(':react-native-sunmi-inner-printer')
  • adds package references to MainPackage.java
import com.sunmi.innerprinter.SunmiInnerPrinterPackage;
...

 @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new SunmiInnerPrinterPackage()
      );
    }

Step 3:

refer in the javascript:

import SunmiInnerPrinter from 'react-native-sunmi-inner-printer';

Usage & Demo:

See examples folder of the source code that you can find a simple example of printing receipt. // TODO

1.2.0

8 months ago

1.2.1

8 months ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.6

4 years ago