AbobosSoftware / cordova-plugin-brother-label-printer

Cordova and Capacitor plugin for Bother Label Printers
MIT License
10 stars 16 forks source link

Cannot find Bluetooth Printer on Android #21

Closed DorianLovera closed 4 years ago

DorianLovera commented 4 years ago

Hello and thank you for your work on this plugin so far.

I am currently facing a critical issue with the Bluetooth on this plugin. After calling findNetworkPrinters() or findBluetoothPrinters(), the method returns an empty array : [ ]

What I have tested so far:

Configuration

Printer : QL-820NWB Mobile Phone : Google Pixel 1 - Android 10 Framework : Ionic 4

I really hope that someone can help me resolve this issue. Can this be linked to a depreceated SDK or a missing authorization for Bluetooth in my config.xml ?

Thank you for your support

DorianLovera commented 4 years ago

I have discovered the following commented lines in the plugin config.xml :

<uses-permission android:name="android.permission.BLUETOOTH" android:required="false" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:required="false" />

I will try to uncomment them tomorrow at work, test and keep you updated.

DorianLovera commented 4 years ago

My answer above solved the problem ! I hope that this issue helps someone :)