Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofelletti authored Dec 5, 2022
1 parent 35177f2 commit 6dc7bc3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To use it, just:
* Build the RequestResultsDispatcher
* Example: in the `MainActivity`'s `onCreate` function add
```Kotlin
permissionsUtilities.buildRequestResultsDispatcher {
permissionManager.buildRequestResultsDispatcher {
withRequestCode(POSITION_REQUEST_CODE) {
checkPermissions(POSITION_REQUIRED_PERMISSIONS)
doOnGranted {
Expand All @@ -44,9 +44,7 @@ To use it, just:
* Call `PermissionsUtilities.checkPermissions` where you want to check for a set of permissions (and ask them if not granted)
* Example: in your Activity, where you want to check (and request) permissions add
```Kotlin
PermissionsUtilities.checkPermissions(
this,
POSITION_REQUIRED_PERMISSIONS,
permissionManager.checkRequestAndDispatch(
POSITION_REQUEST_CODE
)
```
Expand All @@ -59,6 +57,6 @@ To use it, just:
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
PermissionsUtilities.dispatchOnRequestPermissionsResult(requestCode, grantResults)
permissionManager.dispatchOnRequestPermissionsResult(requestCode, grantResults)
}
```

0 comments on commit 6dc7bc3

Please sign in to comment.