Android M runtime permissions utility class

Written by

on

in

, ,


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

About the author:

Catzie Avatar

The homo sapiens behind these blog posts is “Catzie“

Explore my top blog posts:

Comments

Leave a Reply

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