Application restarts when deny background location.

Hello,
Recently i have upgraded expo to version 41, I have read about significat changes in location module, and I made changes in my app. On android it seems ok, but I have problem when Deny background location from system settings page. If I choose Ask Every Time, or Deny, application just restarts.

Asks the user to grant permissions for location while the app is in the background. On Android 11 or higher: this method will open the system settings page - before that happens you should explain to the user why your application needs background location permission. For example, you can use Modal component from react-native to do that.

this is the part of documentation which explains background location on android 11. If anyone knows why this happens, it would be great. Thank you.

1 Like

I’ve experience this exact issue on Android 10 and 11 with expo v42. As part of our app flow, if the user has their permission level set to “While using the app” or “Ask every time” and they want to use our feature that requires “Always Allow” we’ll send them to the settings page. If they choose a lower level than they currently have (like “Deny”) then the app restarts. If they choose the same or higher permission level, everything works as expected.

This doesn’t occur on IOS.

I haven’t found a workaround either. It seems like we just have to deal with the restart in this case, which is a really poor user experience.