leesiongchan / react-native-esc-pos

A React Native ESC/POS module to help you connect to your ESC/POS printer easily.
MIT License
80 stars 84 forks source link

Need Bluetooth permission: Neither user 10091 nor current process has android.permission.BLUETOOTH #39

Closed Jinentonik closed 4 years ago

Jinentonik commented 4 years ago

How do i get bluetooth permission using this library?

codyteng commented 4 years ago

@Jinentonik just follow the steps here https://reactnative.dev/docs/permissionsandroid

Jinentonik commented 4 years ago

@codyteng hmmm, i can't find bluetooth permission.

codyteng commented 4 years ago

The first 2 paragraphs discussed the permission behavior in Android, in case you missed this line.

The so-called "normal" permissions are granted by default when the application is installed as long as they appear in AndroidManifest.xml.

Here's the list of permissions available for Android: https://developer.android.com/reference/android/Manifest.permission

For this repo, you will need the following permission:-

<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Jinentonik commented 4 years ago

@codyteng Thank you for taking the effort to explain to me. Honestly i am new to react native. I do not understand what i need to do with the 2 paragraph. @leesiongchan Thank you for adding the permission part to Readme.

Besides, i am having issue with EscPos.scanDevices(); It does nothing when i use this function. I am now having trouble to find the bluetooth printer.