BLE Guide¶
BLE in iOS SDK¶
In iOS, Location Services employ Bluetooth for indoors. Therefore, Pointr SDK’s indoor location detecting mechanisms also require Bluetooth of the device to be turned on while in use.
Since Bluetooth is only needed as a helper for indoor Location Services and our SDK does not call any Bluetooth apis directly, getting user’s permission to use Bluetooth in your app is not required. However, you may still find it useful to request permission to access Bluetooth state in your app, so that you can determine when the reason of not getting indoor location information is user device’s Bluetooth being off.
You can utilize PTRPermissionManager
’s requestBluetoothAuthorizationPermission()
api to request the permission to access device’s Bluetooth state. You can also review other apis related to Bluetooth in PTRPermissionManager reference and find more examples of their usage in Permission Manager Guide.
Note
Please note that indoor Location Services use Bluetooth regardless of whether your app has permission to access Bluetooth state. Bluetooth permission is only needed if you would like to access the current on/off state of the Bluetooth of device.
Therefore, * If device Bluetooth is on, and you never requested Bluetooth permission or the user disables it from Settings after initially granting permission, indoor location services would keep working with the assistance of Bluetooth.
-
If device Bluetooth is on and the user disables new Bluetooth connections through Conrol Center, Pointr SDK would keep receiving data from beacons it already received data before, but it cannot access beacons that became active afterwards.
-
If device Bluetooth is turned off, indoor location services would not work even if Settings shows that your app has Bluetooth permission, and beacon information gets reset; therefore when it is turned on again, new connections must also be in enabled state in Control Center for beacons to be tracked again.
-
If Bluetooth is disabled on the user device, as long as the Location permission is given and location services is enabled, the user will continue to get only GPS positions.
BLE in Android SDK¶
Pointr location system uses Bluetooth to calculate the position of the device. So, for the indoor positioning to work as expected, the user needs to have bluetooth enabled, and for apps that target Android 12 or higher, the user needs to explicitly give Bluetooth permission. In addition to this, the user also needs to allow location use.
Allowing your application to use Bluetooth and keeping it as enabled is a requirement for Pointr to calculate indoor positions. Also, Pointr will be able to understand if the bluetooth is off and has helper methods to prompt the user to enable it. These can be done through the Permission Manager in Pointr SDK. See api reference here for more details.
Note
Please note that the device might use Bluetooth to calculate location even though the Location Services is disabled. This is possible if the ‘Bluetooth Scanning’ option under ‘Location Services’ is enabled.
-
The bluetooth permission is a requirement for apps that target Android 12 and higher. So for this case, the indoor positioning will not work even if the Bluetooth on the device is enabled.
-
The location permission is a requirement for the Pointr SDK to use Bluetooth to calculate location. If the location permission is denied, the SDK will not be able to calculate indoor positions even if the bluetooth is enabled and bluetooth permission is given.
-
If the Bluetooth permission is not given or Bluetooth is disabled on the user device, as long as the Location permission is given and location services is enabled, the user will continue to get only GPS positions.