08 – Permissions

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.

PermissionDescription
ACCESS_NETWORK_STATETo know if we have network or we don’t
ACCESS_WIFI_STATETo know if WiFi is ON/OFF
CHANGE_WIFI_STATETo turn WiFi ON/OFF
INTERNETTo have access to communications
BLUETOOTH_ADMINTo turn BLE ON/OFF
BLUETOOTHTo scan BLE
WAKE_LOCKTo keep CPU active while in Situm is running in the background as a Foreground Service.
FOREGROUND_SERVICETo be able to launch Situm SDK as a Foreground Service
HIGH_SAMPLING_RATE_SENSORSAllows 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.

PermissionDescription
ACCESS_COARSE_LOCATIONRequired for positioning in Building Mode. If you want to perform positioning in Global Mode, you will need the ACCESS_FINE_LOCATION permission.
ACCESS_FINE_LOCATIONRequired for positioning in Global Mode (it also allows positioning in Building Mode).
BLUETOOTH_SCANTo scan BLE in Android 12 and above.
BLUETOOTH_CONNECTTo 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.

Please note! You will need to request appropriate permissions in your application’s code. Please follow our Android, React Native, Flutter or Cordova Quick Start Guide to do so.

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).

SensorTake into account…
WiFiWiFI 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.
BLEBLE 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.
LocationFrom 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:

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”.

Please note! You will also need to request appropriate permissions in your application’s code. Please follow our iOS, React Native, Flutter or Cordova Quick Start Guide to do so.

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).

SensorTake into account…
BLEBLE 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.
LocationFrom 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.

Subscribe to our newsletter

BASIC INFORMATION ON DATA PROTECTION

Data controller: SITUM TECHNOLOGIES, S.L.
Contact: Data controller: situm@situm.es
Responsible for protection: dpo@situm.es
Purpose and legal basis: To manage the sending of SITUM newsletters only with consent.
Legitimation: Express consent of the interested party.
Recipients: The data will not be passed on to third parties with the exception of legal obligations.
Retention period: As long as the interested party remains subscribed to the newsletter (a link to unsubscribe will be available in each newsletter sent by Situm).
Rights: The interested party may at any time revoke their consent, as well as exercise their rights of opposition, access, conservation, rectification, limitation, deletion of data and not be subject to a decision based only on automated data processing, by writing to SITUM at the addresses indicated.
Additional Information: You can consult additional and detailed information on Data Protection in our privacy policy.

Please, download your copy here

Thank you for downloading our whitepaper. Please do not hesitate to contact us if you would like to know more about how our solutions can help your business. Download whitepaper


Close window