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

An odd human being who happens to have a variety of ever-changing interests, but right now they are programming, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert/drink flavors, obsessing about finding out how some things works, automation, anime, video games... Ran online dessert shops Cookies PH and Catzie's Cakery in her past life.

Leave a Reply

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