Closed clarklight closed 11 months ago
@clarklight sounds interesting!
Which version of Android are you running this with? Is Location enabled on this phone? Are you able to provide the snippet you're using to do the scan?
It's also worth doing a scan with nrf Connect as well just to make sure the Bluetooth devices you're looking at are all actively advertising.
@peitschie Thank you so much for the quick pointer!! I managed to get it to work, i did have Location setting, but i didnt know that it won't give me a prompt if it isnt turned on, i just turned the Location on, and it is showing the devices now!! Thank you so much! Clark
Fantastic. Glad it was resolved so readily.
Just as a bit of background location services are not required on all phones or Android versions to scan... so it's a bit hit and miss as to whether it's needed or not. Hence, the plugin itself doesn't reject a scan even when location services are disabled because we have no way of knowing if the scan works or not.
There are APIs available to listen for updates to the location services if you need them in your app: https://github.com/don/cordova-plugin-ble-central#islocationenabled
I used the @slim version and have the permissions below, when i copied and pasted in the demo code to test out a scan, it says scan completed, but returned no item, but i have atleast a few bluetooth device next to me??? Any pointer?
Thanks Clark