You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2022. It is now read-only.
Google docs is [here](https://developer.android.com/preview/features/runtime-permissions.html). Unlike the traditional way of asking permission Android M increased its security by enforcing apps to ask permissions on the fly as and when the user requests for a feature that requires those permissions. These permissions can also be revoked by the user at any time.
6
8
## How to integrate into your app?
7
9
Integrating the library into you app is extremely easy. A few changes in the build gradle and your all ready to user Runtime permissions library. Make the following changes to build.gradle inside you app.
@@ -28,16 +30,16 @@ This will create an object of the Runtime Permission class for you. Make sure it
28
30
To check if the app has a specific permission you can call `runtimePermission.hasPermission(Activity activity, String permission);` or if you want to check
29
31
whether the app has multiple permission you can call `runtimePermission.hasPermissions(Activity activity, String[] permissions)`.
30
32
31
-
You can request for a permission by calling `runtimePermission.requestPermission(Activity activity, String permission, int requestCode)` or request multiple
32
-
permissions by calling `runtimePermission.requestPermission(Activity activity, String[] permissions, int requestCode)`. However you will need to override a
33
-
method on your activity inorder to wait for a callback from the library. Just add this to you activity.
You can request for a permission by calling `runtimePermission.requestPermission(Activity activity, String permission, int requestCode)` or request multiple
40
+
permissions by calling `runtimePermission.requestPermission(Activity activity, String[] permissions, int requestCode)`. However you will need to override a
41
+
method on your activity inorder to wait for a callback from the library. Just add this to you activity.
0 commit comments