Location Permission in Android 10
As Android 10 has introduced, the dialog UI as well as handling the location permission has updated. Now, the user has right to allow/disallow that the app can fetch location while it is in background. To accomplish this, a new permission has to be declared in the manifest file:
android.permission.ACCESS_BACKGROUND_LOCATION
Calling this would pop up a dialog with basically three options:
Along with these options, there are some other scenarios i.e.
On selecting Deny will give a new option
Or, if user selects 'Allow only while using the app', the next time the app is launched, it will only ask the user to allow the Location Permission or deny.
User can choose this option to optimize the battery consumption as some of the apps use location updates even when the app is in background or service might be running even if the appis killed. Lets take a simple example of a share cab app. It consist of a driver app & a user app. Driver app needs location updates even if the app is closed if the driver is already login using the app. Whereas the user app doesn't need location updates while it is in background or killed state. So eventually, it is in user's hand what option he/she chooses.
You can know more about the location permission on "https://developer.android.com/about/versions/10/privacy/changes"
android.permission.ACCESS_BACKGROUND_LOCATION
Calling this would pop up a dialog with basically three options:
- Always Allow
- Allow only while using the app
- Deny
Along with these options, there are some other scenarios i.e.
On selecting Deny will give a new option
- Deny & Do not ask again
Or, if user selects 'Allow only while using the app', the next time the app is launched, it will only ask the user to allow the Location Permission or deny.
User can choose this option to optimize the battery consumption as some of the apps use location updates even when the app is in background or service might be running even if the appis killed. Lets take a simple example of a share cab app. It consist of a driver app & a user app. Driver app needs location updates even if the app is closed if the driver is already login using the app. Whereas the user app doesn't need location updates while it is in background or killed state. So eventually, it is in user's hand what option he/she chooses.
You can know more about the location permission on "https://developer.android.com/about/versions/10/privacy/changes"
Comments
Post a Comment