Situm SDK needs the user to grant some permissions in order to work properly. This section explains the most important, and how they will affect the positioning experience.
Android #
According to Android docs, application permissions help support user privacy by protecting access to restricted data and restricted actions. Broadly, permissions can be categorized in “Install-time” and “Runtime”.
Install-time permissions declared by Situm SDK #
These permissions allow access to data and actions that extend beyond your app’s sandbox, but the data and actions present very little risk to the user’s privacy, and the operation of other apps. Situm SDK declares a series of these permissions in its Manifest, that will be granted by the user when he installs the app.
Permission | Description |
---|---|
ACCESS_NETWORK_STATE | To know if we have network or we don’t |
ACCESS_WIFI_STATE | To know if WiFi is ON/OFF |
CHANGE_WIFI_STATE | To turn WiFi ON/OFF |
INTERNET | To have access to communications |
BLUETOOTH_ADMIN | To turn BLE ON/OFF |
BLUETOOTH | To scan BLE |
WAKE_LOCK | To keep CPU active while in Situm is running in the background as a Foreground Service. |
FOREGROUND_SERVICE | To be able to launch Situm SDK as a Foreground Service. |
HIGH_SAMPLING_RATE_SENSORS | Allows to read some sensor data (e.g. gyroscope) at a high rate, needed for accurate positioning. |
Runtime permissions #
Also known as dangerous, they give the app additional access to restricted data, and/or allow the app to perform restricted actions that more substantially affect the system. Situm may require the following runtime permissions.
Permission | Description |
---|---|
ACCESS_COARSE_LOCATION | Required for positioning in Building Mode. If you want to perform positioning in Global Mode, you will need the ACCESS_FINE_LOCATION permission. |
ACCESS_FINE_LOCATION | Required for positioning in Global Mode (it also allows positioning in Building Mode). |
BLUETOOTH_SCAN | To scan BLE in Android 12 and above. |
BLUETOOTH_CONNECT | To turn BLE ON/OFF in Android 12 and above. |
POST_NOTIFICATIONS (OPTIONAL) | Allows to show our push notifications inside the notification drawer in Android 13 and above. If not granted, user won’t receive alerts associated with foreground services in their notification drawer. Nevertheless, notices pertaining to these foreground services will still be visible in the Task Manager, irrespective of the user’s decision on the notification permission. See Android docs for more info. |
Sensor access #
These are the most common things to take into account that Situm SDK needs to have access to sensors. We recommend the app developer to implement mechanisms to ensure that the user does not disable any option that is critical for its use case (e.g. detecting the state of each sensor and asking the user to change it if required).
Sensor | Take into account… |
---|---|
WiFi | WiFI ON/OFF. In the system’s tray, users can turn ON/OFF WiFi. Situm can scan WiFi either way, provided that the WiFi scan ability (see next paragraph) was not turned OFF by the user. We actually recommend that WiFi is turned OFF and the user is disconnected to the WiFi. WiFi Scanning ON/OFF. From Android >4, users can turn ON/OFF the capability to scan WiFi for positioning purposes. Usually, this is under Settings / Security & Location / Location / Scanning. If users turn OFF WiFi Scanning, Situm SDK will not be able to scan WiFi. WiFi Throttling. From Android 9 onwards, Android implements a limitation called WiFi Throttling, that limits number of WiFi scans to 1 every 30 seconds. More information here. |
BLE | BLE ON/OFF. In the system’s tray, users can turn ON/OFF BLE. In case BLE is turned OFF, Situm Situm will not be able to scan BLE beacons. To avoid this, Situm SDK provides an option to automatically re-enable BLE. BLE scanning ON/OFF. From Android >4, users can turn ON/OFF the capability to scan BLE for positioning purposes. Usually, this is under Settings / Security & Location / Location / Scanning. If users turn OFF WiFi Scanning, Situm SDK will not be able to scan BLE. |
Location | From the system’s tray, user may turn ON/OFF the smartphone Location Services. Before Android 6.0, turning this OFF only restricted access to the GPS and WiFi scanning. From Android 6.0, it restricts access to any sensor that could be used to provide a Location, including GPS, WiFi, and BLE. Therefore, turning Location OFF will cause Situm SDK to not work at all. |
iOS #
As in Android, iOS apps running Situm will need certain permissions. These permissions can be configured from XCode tab “Settings/Info”, by creating the following keys:
- NSLocationAlwaysAndWhenInUseUsageDescription. In Xcode: “Privacy – Location Always and When In Use Usage Description”.
- NSLocationWhenInUseUsageDescription. In Xcode: “Privacy – Location When In Use Usage Description”.
- NSMotionUsageDescription. In Xcode: “Privacy – Motion Usage Description”.
You will also need to add a description to each key, which will be shown to the user at the time the app request each specific permission. For example, to ask for Location usage you can add the key “NSLocationWhenInUseUsageDescription with the description “Location is required to find out where you are”.
Sensor access #
Contrary to Android, iOS does not allow to scan WiFi signals. However, BLE and Location are used in iOS, just like in Android. As in Android, the developer should implement the appropriate mechanisms to ensure that the user does not disable any option that is critical for its use case (e.g. detecting the state of each sensor and asking the user to change it if required).
Sensor | Take into account… |
---|---|
BLE | BLE ON/OFF (system’s tray). In the system’s tray, users can turn ON/OFF BLE. Even if BLE is turned OFF here, Situm still be able to scan BLE beacons. BLE ON/OFF (Settings). In the device Settings, in the “Bluetooth” section, you may turn OFF the Bluetooth. If you do, Situm will not be able to scan BLE beacons. |
Location | From the device Settings, in the “Privacy & Security” section, and “Location Services” subsection, you might: 1 – Disable Location Services. 2 – Deny Location Permissions to your application (by selecting your application and choosing “Never” under “Allow Location Access” subsection) 3 – Disable Precise Location (by selecting your application and toggling this setting off) In all these cases, Situm will not be able to provide the user location, neither indoors or outdoors. |
Isn’t BLE permission required? #
In the Situm iOS SDK version 3.0.0 and onwards, the requirement for Bluetooth permissions has been eliminated. This means that in your main .plist file, you can safely remove both the Privacy – Bluetooth Always Usage Description and Privacy – Bluetooth Peripheral Usage Description permissions.
Despite the removal of these permissions, Situm SDK retains its capability to scan BLE beacons while ensuring that apps integrating Situm SDK can be published on the Apple Store without encountering issues related to these permissions.
To understand why BLE permissions were necessary in the past, it’s important to note that iOS offers two ways to scan for BLE devices: using Core Location and Core Bluetooth APIs. Core Location is limited to iBeacon scanning, whereas Core Bluetooth provides broader access to BLE features, like scanning various BLE signals and connecting to BLE devices. Accordingly, Core Location requires Location Permissions, and Core Bluetooth necessitates Bluetooth Permissions.
Previously, up to version 3.0.0, our SDK utilized certain low-level functions from Core Bluetooth to ensure reliable beacon scanning. However, advancements in Core Location have made it sufficiently robust for our needs, leading us to migrate our iBeacon scanner module to solely use Core Location. This shift away from Core Bluetooth means Bluetooth Permissions are no longer necessary in the latest versions of the Situm SDK, which now fully relies on Core Location.