Android 11 is currently in beta with a public release planned for the third quarter of 2020.
From a native screen recorder with the ability to enable device audio-recording to scheduled dark modes and viewing message notifications as bubbles, a lot of exciting new changes are set to roll out with Android R this year.
Privacy has been the primary focus for the next Android update, which means the work for developers has been cut out.
In the following sections, I’ll take you through a checklist to refer to when shipping your next app for Android 11.
Android 11 bumps up its permission model by including one-time permissions to give users more granular control over their location, camera, microphone, and other system permissions access.
This means if the user kills the app and re-opens it, the permission dialog will be prompted again before accessing the relevant system controls.
It’s worth noting that if the user puts your app in the background, the permission will still be intact while the activity or service is running.
This makes handling system resources access all the more crucial as it can be terminated anytime.
Android 11 system now has a lot more emphasis on data and privacy. A user who’s not used a particular app for months might not be aware of the permissions it had been granted in the past.
Hence, to make the user more conscious and in control of their resources, the system will automatically reset all permissions for unused apps.
In doing so, developers could hit a roadblock with background services that require those permissions for tasks such as syncing data or fetching location.
Luckily, you can inform users to disable auto-revoke of permissions from the settings. All you need to do is launch an intent to the app’s setting page using [Intent.ACTION_AUTO_REVOKE_PERMISSIONS](https://developer.android.com/reference/android/content/Intent#ACTION_AUTO_REVOKE_PERMISSIONS)
.
Also, invoke the isAutoRevokeWhitelisted()
method to determine the status of your app’s permissions.
Another important change in the runtime permissions flow with Android 11 is the introduction of implicit “don’t ask again.” Up until Android 10, the developer could keep prompting the permission request every time the user pressed Deny. Now, if the user repeatedly taps Denyconsecutive times for a specific permission, the action implies “don’t ask again.”
#programming #kotlin #technology #android-app-development #android