We recommend using UserHelperManager to let Situm SDK handle the request for permissions. Use this approach only if you need to request permissions manually for some reason.
When to request permissions at runtime #
After declaring the necessary permissions (see Permissions & Error Handling) and integrating our SDK into your project, you’ll need to ask the user for runtime permissions. You can request these permissions right before starting positioning or start positioning directly and rely on the onLocationError() callback to respond in case of missing permissions. Moreover, you might want to start positioning at different points in your application’s lifecycle. Typically, there are 2 common points.
- Start positioning as soon as the app opens: In this case, you will need to request the permissions at the very first moment the user enters the app. This way, you will be able to request location updates from the device as soon as posible. In this case, it is especially important to explain to the user which permissions are needed and why.
- Start positioning when displaying the map: Once the user opens our Map Viewer for wayfinding, you may want to locate him inside your building and, beforehand, requesting the permissions.
In all cases, it’s crucial to explain clearly to the user why these permissions are needed before making the actual request to the operating system. Research shows users are much more comfortable with permission requests if they know why the app needs them.
Here you can see an example implemented in our app Situm Wayfinding:
1. Providing context Explain to the user which permissions will be requested and why. | 2. Actual request Make the request to show the Operating System dialog. | 3.a. Permissions granted Now the app will be fully functional. | 3.b. Permissions denied In this case, you should inform the user that the app will lack important features. |
![]() | ![]() | ![]() | ![]() |
The following figures illustrates the workflow and set of decisions associated with this process:
Option 1: Start positioning directly and rely on the onLocationError() callback to respond in case of missing permissions:

This is a type of reactive implementation where the main action is starting the positioning. The permission request depends on an error notified by SitumSDK. Situm Wayfinding was implemented this way.
Option 2: Request permissions before starting positioning fits better with your implementation:

In all cases, we strongly recommend following the official best practice guidelines: