Google is making some changes to setting permissions on the latest Android 6.0 Marshmallow. Actually, it’s not just some as the Internet giant said the development is one the largest changes to the current permissions model. At present, the platform follows the install time permissions model but it will soon be replaced by a new one. This will particularly target those apps running on Android Marshmallow devices and one that targets API 23.
It’s a fact the Android can do a lot of multitasking around. You can make phone calls, get devices, take photos, play games, write notes, work, and do more on the mobile platform. As much as it offers a lot of features and functions, it uses sensitive user data that are usually secure and protected by permissions. Every app that runs on Android has permissions to set and control private data like location, calendar, or contacts.
With Runtime Permissions, apps are now allowed to individually control what context and when a user will ask for permissions. Before, every time a user downloads an app, list of permissions must be accepted as a requirement. This time, you are no longer required to accept such. Permissions can still be added and without the updates being blocked.
With the changes in permissions model, each app can now ask for runtime permissions only as needed. This is expected to improve user experience of the app because every design, every text, or message prompt matters. Most of them can be pretty annoying so app developers must know when to show and ask for runtime permissions. All these will affect how one uses the app.
Google has published a new set of Permission design guidelines that include new design patterns, handling permissions that are denied, why permissions are needed, and when is the best time to request permissions.
App developers will find that using a runtime permission requires some best practices. There are also tools available from Google. Here are some tools you can use:
• requestPermissions() – to request permissions
• ContextCompat.checkSelfPermission() – to check if app has permission already and bring up the system controlled permissions dialog
Developers will find the guidelines very helpful but remember permissions can still be revoked by any user any time. These permissions can be avoided for example, by using ACTION_IMAGE_CAPTURE as this can start a familiar camera app user knows instead of building a new experience within your own app.
If you’re a developer, feel free to study the developer guide and design guidelines. They will help you in preparing apps for runtime permissions and Android 6.0 Marshmallow. Google aims to help you build better apps and hopefully, the Runtime Permissions will improve the app experience of every user.
SOURCE: Android Developers Blog