Skip to content

Operating System Permissions

Android and iOS both require several permissions to be explicitly requested from the user before certain features of the devices are enabled. For example permissions are needed to use Bluetooth for device positioning. If the project configuration has the correct permissions prepared, the SDK will request the correct permissions automatically.

Warning

SDK does not request or grant any permission if the application is not configured to have it. Permissions can be removed from the host application. However removing the permissions, may cause some SDK features not to work, like positioning and wayfinding.

Project Configuration

On iOS, all permissions needed must be added to the info.plist file, Apple doesn’t allow SDKs to include permissions on projects on their own. For Android the permissions needed by Pointr SDK are part of the library android.manifest file already, and instead unwanted permissions that must be removed.

On both platforms, it is possible (or necessary in case of iOS) to write descriptions of the permissions. Write good descriptions, because otherwise your application can be rejected from the manufacturer’s store.

It is important to note that on iOS, none of the permissions are required, add permissions only if your project needs them.

Warning

Just to reiterate: Write clear descriptions when requesting permissions, your application can be rejected if descriptions are unclear or don’t give a good reason about why the permission is needed.

On your project info.plist file, the following permissions must be added as appropriate:

Location permissions

These permissions are required to use bluedot or other location-based features, even if you will use only GPS and avoid Bluetooth beacons.

  • NSLocationAlwaysAndWhenInUseUsageDescription -> Use this key if your iOS app accesses location information while running in the background. Required for iBeacon, GPS location. (iOS 11+ only). Warning: Do not use this permission if you don’t plan in getting location information on the background (for example for Geofencing purposes). Apple will reject your application if this is requested without a good reason.
  • NSLocationWhenInUseUsageDescription -> Use this key if your iOS app accesses location information only when running in the foreground. Required for iBeacon, GPS location and geofencing. (iOS 11+ only).
  • NSLocationAlwaysUsageDescription -> Required for iBeacon, GPS location and geofencing (iOS 10 and below only).

As an example, you can use the keys and values shown in below image in your plist file in XCode:

Location Permissions Image

Core Motion permission

The SDK uses the device’s motion sensors combined with the beacon’s signals in order to calculate an accurate position. Starting on iOS 17.5, iOS requires the user to specifically given permission to access motion data. Only apps compiled with iOS SDK 17.5 or later require the permission.

Bluetooth location permissions

SDK has the capability to check the state of the Bluetooth Services. The following permissions are required to get the state information:

Note: These permissions are not necessary for positioning but rather for better diagnostic about positioning problems.

On Android the following permissions are relevant to Pointr SDK:

Required permissions

The Internet permission is needed, even if you plan in using the SDK mostly offline because at least once the SDK must check the license and download content from a Pointr Cloud server, and this is not possible without this permission, even if the server is on an internal network and not on the actual internet. The NETWORK state permission checks if the internet is available to be used, if you remove that permission, the SDK will crash.

  • android.permission.INTERNET -> needed for retrieving Pointr content, checking the SDK license, uploading position to Pointr Cloud and any other online feature.
  • android.permission.ACCESS_NETWORK_STATE -> needed for assessing connectivity, SDK will crash when checking license if you remove this permission.

Location permissions

These permissions are needed to use bluedot or other location-based features, even if you are not using Blutooth beacons. Note that if you ARE using bluetooth beacons for location, the “FINE LOCATION” permission is mandatory, “COARSE LOCATION” is not enough in this case.

  • android.permission.ACCESS_COARSE_LOCATION -> needed for accessing any kind of location information.
  • android.permission.ACCESS_FINE_LOCATION -> needed for accessing GPS and BLE location sensors.

Bluetooth permissions

These permissions are needed to use bluetooth beacons to calculate bluedot position. Note you will need these permissions AND the location permissions.

  • android.permission.BLUETOOTH_CONNECT -> for devices with Android 12 (Snow Cone) and later.
  • android.permission.BLUETOOTH_SCAN -> for devices with Android Android 12 (Snow Cone) and later.
  • android.permission.BLUETOOTH -> for devices with Android 11 (Red Velvet Cake) and before.
  • android.permission.BLUETOOTH_ADMIN -> for devices with Android 11 (Red Velvet Cake) and before.

Background location and geofencing permissions

These permissions are needed for background location of any kind, and to do geofencing, since it requires constant monitoring of positions.

  • android.permission.ACCESS_BACKGROUND_LOCATION -> for devices with Android Q and later - Required only when requesting background location access or using Google native Geofencing API.
  • android.permission.FOREGROUND_SERVICE -> necessary for the application start as a foreground service and keep scanning for its location constantly without OS interruption, also needed to start background service for background location or geofencing.
  • android.permission.RECEIVE_BOOT_COMPLETED -> needed to start Pointr SDK as foreground service after reboot.

Miscellaneous permissions

These are miscellaneous permissions added to the SDK by default for your convenience, they can be removed safely if you don’t care for certain features.

  • android.permission.WAKE_LOCK -> To keep processing when the application appears “idle”, for example when the user is standing still looking at the screen without touching anything.
  • android.permission.ACCESS_WIFI_STATE -> needed for assessing if wifi is on.

Removing Permissions

You might want to remove certain permissions that are not in use. For example you might want to remove ACCESS_BACKGROUND_LOCATION, because this permissions is not allowed in the Play Store without a good reason. You can remove it by doing the following change on your android.manifest file, inside the scope <manifest>, before <application>:

<uses-permission
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
tools:node="remove" />

Permissions programmatic management

Since the release of Pointr SDK 7.0, the SDK contains a Manager dedicated to Permissions, the Permission Manager can change when permissions are asked for, receive events when permissions change and so on. Please check the linked documents to get mode details about this.


Last update: May 15, 2024
Back to top