BluetoothSerial icon indicating copy to clipboard operation
BluetoothSerial copied to clipboard

Fix not working on devices with Android 10 and above.

Open inlacou opened this issue 5 years ago • 4 comments

In Android 10 and above, ACCESS_FINE_LOCATION is needed instead of ACCESS_COARSE_LOCATION.

inlacou avatar Jan 11 '21 17:01 inlacou

@inlacou @don can this be merged to master or closed?

mareksip avatar Feb 27 '21 17:02 mareksip

I built a test project and added https://github.com/irontec/BluetoothSerial.git directly from @mareksip as a plugin - unfortunately on my Pixel 3a Android 11 I still could not discover devices. There is never a callback as others have reported. I did check the AndroidManifest.xml and the right permissions were in there (both fine and course). I also verified the plugins source code that I had changes from @mareksip - Really bummed out we don't have bluetooth support on Cordova for Android at this point :(

jriffel avatar Mar 09 '21 01:03 jriffel

Well I spoke too soon... I continued testing and used adb logcat and was able to see bluetooth was being denied because location services were not enabled. Once I enabled location services I was able to scan devices using this pull request. Sorry for the misleading comment which I left in place so the internet can observe my mistakes.

jriffel avatar Mar 09 '21 01:03 jriffel

Well I spoke too soon... I continued testing and used adb logcat and was able to see bluetooth was being denied because location services were not enabled. Once I enabled location services I was able to scan devices using this pull request. Sorry for the misleading comment which I left in place so the internet can observe my mistakes.

Glad you found a solution! 👍

mareksip avatar Mar 09 '21 03:03 mareksip