Expo-location, no "Allow all the time" option

  1. SDK Version: 39
  2. Platforms(Android):10
    Can someone help me, i have problem with location permissions, want to use background location, and when app starts, and I ask for lication permission, there is no “Allow all the time option” and when i choose “Allow only while using app” background location does not work, when i change it in app setting to “Always” it works okay. So my qyestion is why “Always” option is missing, and can I somehow dispay it?
4 Likes

We are also experiencing this in our app, please let us know if there’s a solution for this.

I have the same issue as well, but I think it might be specific to the OS. Idk.


We can’t do much probably.

Any update? I need get location in background too

Im having a similar issue with SDK Version 38 and Android 10.

In my case i can select ‘Allow only while using the app’ or ‘Allow all the time’. I do not need background location service but if i choose ‘Allow only while using the app’ location permission status are undetermined.

If android version is lower than 10 its working correctly.

Any idea?

You may find useful to read the documentation at this link:

When a feature in your app requests background location on a device that runs Android 10 (API level 29), the system permissions dialog includes an option named Allow all the time . If the user selects this option, the feature in your app gains background location access.
On Android 11 (API level 30) and higher, however, the system dialog doesn’t include the Allow all the time option. Instead, users must enable background location on a settings page, as shown in figure 3.

Update.
I managed to display all thre option requesting for location like this

import * as Permissions from ‘expo-permissions’;
const { status } = await Permissions.askAsync(Permissions.LOCATION);

when I was trying this way

import * as Location from “expo-location”;
let { status } = await Location.requestPermissionsAsync();

Allow all the time was not displayed.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.