npm install react-native-esc-pos-printer
or
yarn add react-native-esc-pos-printer
Add the following permissions to android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
For Android >= 10 add:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
pod install
When the Bluetooth or USB is used, set the protocol name. Set the protocol name according to the following procedure:
- In Project Navigator, select *.plist. (The file name will be Project name-info.)
- In the pop-up menu, select Add Row.
- Select "Supported external accessory protocols".
- Expand the items added in Step 3.
- Enter com.epson.escpos as the Value for Item 0.