Android Question BLE and location request

red30

Well-Known Member
Licensed User
Longtime User
I am using BLE. And on some devices (mostly new devices), for correct operation, you need to enable location detection, and on other devices, simply turning on the bluetooth is enough. How to determine where it is enough to turn on the bluetooth, and where you also need access to the location?
There is a program "nRF Connect". If I run it on my HTC (Android 9), the program shows that I need to turn on the bluetooth and allow access to the location (if I just turn on the bluetooth and start searching for devices, then there is nothing to sit around until I give access to the location).

If I run on Samsung (Android 4.4.2), then just turn on the bluetooth and the search will go fine.

How can you do the same with B4A?
 

red30

Well-Known Member
Licensed User
Longtime User
If I want to use targetSdkVersion = "28", then on Android 6+ devices I must somehow inform the user that further work is possible only if the user provides access to the location. And if the device is Android 6-, then I no longer need this permission, it's enough just to turn on bluetooth for further work.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…