thiendangit / react-native-thermal-receipt-printer-image-qr

React native thermal receipt printer
https://www.npmjs.com/package/react-native-thermal-receipt-printer-image-qr
111 stars 73 forks source link

Permission error on Android v12+ #98

Open dieg092 opened 1 year ago

dieg092 commented 1 year ago

Permission error appears in android v12+ devices. I think that add this permission inside AndroidManifest.xml could fix it: <uses-permission android:name="android.permission.BLUETOOTH_CONNECT_PRIVILEGED" />

WhatsApp Image 2023-03-02 at 20 20 22 WhatsApp Image 2023-03-02 at 20 20 21

Salem-Abderaouf commented 1 year ago

Still an issue!

huytdps13400 commented 1 year ago

use library react-native-permissions https://github.com/zoontek/react-native-permissions export async function requestBluetoothPermission() { const status = await request( Platform.select({ android: PERMISSIONS.ANDROID.BLUETOOTH_CONNECT, }), ); return status; On Android 12+ You can check request Permission Bluetooth Connect after when call method getDeviceList Screen Request Permission image Screen Find Device Bluetooth image