Closed acimkompor closed 1 year ago
Note that from Android 12 onwards to have access to a list of paired devices and connect to Bluetooth devices you must have the Nearby Devices permission, the permission is requested by the package, in the app permissions it must be to enable.
The package has an option that allows you to see if the permission is enabled.
PrintBluetoothThermal.isPermissionBluetoothGranted
Note that from Android 12 onwards to have access to a list of paired devices and connect to Bluetooth devices you must have the Nearby Devices permission, the permission is requested by the package, in the app permissions it must be to enable.
The package has an option that allows you to see if the permission is enabled.
PrintBluetoothThermal.isPermissionBluetoothGranted
Thank you in advance,
Previously I added permissions when the application was running, and on some devices it worked fine, after I tried it on the Xiaomi 12 Lite device, it didn't work well, I couldn't connect to the printer. get the following error
D/====> print: (29359): connect: UID 10295 / PID 29359 lacks permission android.permission.BLUETOOTH code 256562799
D/====> print: (29359): finalizo tk: connection state:false
thanks for solving this problem.
And does the phone have the nearby devices permission enabled?
And does the phone have the nearby devices permission enabled?
yes, it's allowed and it works on some devices, but it doesn't work on my xiaomi android 12 device.
In some cases when I was testing, even though I enabled the permission, it was not recognized. I don't remember if it was that I uninstalled the application and reinstalled it. In flutter, I used flutter clean and then flutter pub get
I tried under android 12, it's very good, but when I try on android 12, the bluetooth list doesn't appear. I have tested it on several Android 12 devices.
Thank you.