Android M runtime permissions utility class


Hello world, I prepared a PermissionsUtil.java class and it’s on GitHub.

Check it out: AndroidPermissionsUtil

Why use it? It will help by letting you write less code as you add conditions to your Android app that supports Android 6.0 (Marshmallow). The utility class defines helper methods that were used in the following example.

Sample usage of Android M PermissionUtils

On the activity where you need to check for runtime permissions, add these:

And add the callback function to the same activity:

Feel free to use in on any project. And please let me know if you have suggestions on how to improve that Android M runtime permissions utility class.

Related Posts:

Posts that may be related to "Android M runtime permissions utility class":

Catzie

A Filipino programmer with a variety of interests such as baking, singing, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert flavors, obsessing about finding out how some things works, board games, anime, video games, and forgetting things that usually go in her long list of interests. Running small-time online dessert shops Cookies PH and Catzie's Cakery.

Leave a Reply

Your email address will not be published. Required fields are marked *