registerForActivityResult API — Request Single Runtime Permissions in Android | by Prateek Sharma | Feb, 2022

Step 0: Add androidx.exercise dependency

implementation "androidx.exercise:exercise:1.2.0"

Step 1: Declare the permission within the AndroidManifest.xml file.

Step:2 Declare an exercise end result contract for the permission

Step:3 Launching the permission asking dialog

Pic: Permission asking dialog
Consequence gif

More Posts