Skip to content
This repository was archived by the owner on Oct 31, 2022. It is now read-only.

Commit 72fc425

Browse files
author
Mukesh Solanki
committed
updated readme
1 parent 9013cf5 commit 72fc425

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,24 @@ Okay seems like you integrated the library in your project but **how do you use
6363
})
6464
.build();
6565
```
66-
This will create an object of the Runtime Permission class for you. To check if the app has a specific permission you can call `easyPermissions.hasPermission(String permission);` or if you want to check
67-
whether the app has multiple permission you can call `runtimePermission.hasPermission(String[] permissions)`. To request a permission at run time all you need to do is call `easyPermissions.request(String permission)` or if you want to request multiple permissions at the same time you call `easyPermissions.request(String[] permissions)`. However you will need to override a method on your activity inorder to wait for a callback from the library. Just add this to you activity.
6866

67+
**Dont forget to override the onRequestPermissionsResult and pass teh result to the library like wise**
6968
```
7069
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
7170
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
7271
easyPermissions.onRequestPermissionsResult(permissions, grantResults);
7372
}
7473
```
7574

75+
### Check Permissions
76+
To check if the app already has permissions use
77+
* `easyPermissions.hasPermission(String Permissions)` - To check one permission at a time
78+
* `easyPermissions.hasPermission(String[] Permissions)` - To check multiple permissions at the same time
79+
80+
### Request Permissions
81+
* `easyPermissions.request(String permission)` - To request one permission at a time
82+
* `easyPermissions.request(String[] permission)` - To request multiple permissions at the same time.
83+
7684
That's pretty much it and your all wrapped up.
7785

7886
## Author

0 commit comments

Comments
 (0)