As the title says, I'm currently in the process of updating my app to SDK 30 and having trouble with the ACCESS_BACKGROUND_LOCATION
permission. Upon requesting the permission, the user is taken to the app location permission settings and is given 4 options:
- Allow all the time
- Allow only while using the app
- Ask every time
- Deny
All choices except "Allow all the time" do not grant the permission and return a -1
in the grantResults
IntArray
inside the onRequestPermissionsResult()
callback function. Why? This is incredibly confusing. The naming would lead one to believe the permission would be granted and background permission requests only be made when the app is in focus. Is it possible to remove the "Allow only while using the app" option from the choices? How can I fix this?? I only see these choices confusing the user since the permission won't be granted unless they choose "Allow all the time".