W werner_Fourie Member Licensed User Longtime User Feb 21, 2020 #1 Hi All Im using this example https://www.b4x.com/android/forum/threads/ble-2-bluetooth-low-energy.59937/#content. Android 7.0 and Android 8.0 devices This example does not work if "android:targetSdkVersion="28"/>" This is the permissions.. AddPermission(android.permission.ACCESS_COARSE_LOCATION) AddPermission(android.permission.ACCESS_FINE_LOCATION) are set. If I then enable location on the device this example starts to work.. Can anyone tell me if this is correct? Why would You have to put locations on for BLE to work. Thanks to all.
Hi All Im using this example https://www.b4x.com/android/forum/threads/ble-2-bluetooth-low-energy.59937/#content. Android 7.0 and Android 8.0 devices This example does not work if "android:targetSdkVersion="28"/>" This is the permissions.. AddPermission(android.permission.ACCESS_COARSE_LOCATION) AddPermission(android.permission.ACCESS_FINE_LOCATION) are set. If I then enable location on the device this example starts to work.. Can anyone tell me if this is correct? Why would You have to put locations on for BLE to work. Thanks to all.
DonManfred Expert Licensed User Longtime User Feb 21, 2020 #2 werner_Fourie said: AddPermission(android.permission.ACCESS_COARSE_LOCATION) AddPermission(android.permission.ACCESS_FINE_LOCATION) are set. Click to expand... AND you ARE requesting the Permission at rumtime using RuntimePermissions library? android.jar / targetSdkVersion / minSdkVersion Especially RuntimePermissions Note the comment in the Thread you lined: Edit: A new version of BLE_Example was uploaded. targetSdkVersion is now set to 26. Setting the targetSdkVersion to 26 requires some changes: 1. Add the coarse location permission in the manifest editor. 2. Request this permission with RuntimePermissions. Click to expand... Upvote 0
werner_Fourie said: AddPermission(android.permission.ACCESS_COARSE_LOCATION) AddPermission(android.permission.ACCESS_FINE_LOCATION) are set. Click to expand... AND you ARE requesting the Permission at rumtime using RuntimePermissions library? android.jar / targetSdkVersion / minSdkVersion Especially RuntimePermissions Note the comment in the Thread you lined: Edit: A new version of BLE_Example was uploaded. targetSdkVersion is now set to 26. Setting the targetSdkVersion to 26 requires some changes: 1. Add the coarse location permission in the manifest editor. 2. Request this permission with RuntimePermissions. Click to expand...
DonManfred Expert Licensed User Longtime User Feb 21, 2020 #4 If the example works with this permission and location enabled then everything is ok. The requirements are given by Google. You need to check their documentation on why it is needed. Upvote 0
If the example works with this permission and location enabled then everything is ok. The requirements are given by Google. You need to check their documentation on why it is needed.
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2020 #6 BLE can be used to detect location, with beacons for example. So Google decided to add this requirement. Upvote 0
BLE can be used to detect location, with beacons for example. So Google decided to add this requirement.