Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

 

Show the video description

Since Android Marshmallow (API level 23) we have to request certain “dangerous” permissions at runtime. This process usually needs a lot of if/else checks, but the PermissionsDispatcher library simplifies this with the use of annotations.
We will learn how to request a permission, how to show a proper rationale and how to handle situations when the user granted or denied the permission or even checked the “never as again” box.

Important Linksactivity_main.xmlAndroidManifest.xmlMainActivity.java

Library on GitHub with installation instructions:

github.com/permissions-dispatcher/PermissionsDispatcher