react-native-gpos800
Getting started
yarn add https://gitlab.com/secullum/react-native-gpos800.git
Mostly automatic installation
react-native link react-native-gpos800
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.secullum.SECGpos800Package;
to the imports at the top of the file
- Add
new SECGpos800Package()
to the list returned by the getPackages()
method
- Append the following lines to
android/settings.gradle
:
include ':react-native-gpos800'
project(':react-native-gpos800').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gpos800/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:
compile project(':react-native-gpos800')
Usage
import Gpos800 from 'react-native-gpos800';
async function example() {
await Gpos800.start();
Gpos800.printText('123');
Gpos800.printQrCode('https://www.secullum.com.br');
Gpos800.printBarCode('0123456789');
Gpos800.printText('teste\n\n\n');
Gpos800.stop();
}