$ npm install react-native-goojprt-mtp3-library --save
$ react-native link react-native-goojprt-mtp3-library
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.codelibeye.goojprtmtp3.RNGoojprtMtp3LibraryPackage;
to the imports at the top of the file - Add
new RNGoojprtMtp3LibraryPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-goojprt-mtp3-library' project(':react-native-goojprt-mtp3-library').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-goojprt-mtp3-library/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-goojprt-mtp3-library')
- Open bluetooth android and make sure bluetooth printer device is available
- Pair bluetooth printer device
- Make sure bluetooth device name MTP-3 !important
import BTPrint from 'react-native-goojprt-mtp3-library';
BTPrint("<BT Device Mac Address>", "<PDF Local File Path>")