Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ido-Barnea committed Mar 26, 2022
2 parents 93e34b0 + c388b99 commit 3763ec9
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# :key: EasyPerms
A simple library to help developers ask for permissions more easily.
A simple library to help developers ask for permissions more easily

# :question: How can I add this to my project?
> Step 1: Add the JitPack repository to your build file
Expand All @@ -13,13 +13,38 @@ A simple library to help developers ask for permissions more easily.
> Step 2: Add the dependency
```gradle
dependencies {
implementation 'TODO TODO TODO TODO TODO'
implementation 'com.github.Ido-Barnea:EasyPerms:1.0.0'
}
```
That's it!

# :fast_forward: Quick use
TODO TODO TODO TODO TODO
```kotlin
val permissions = arrayListOf(Manifest.permission.CAMERA, Manifest.permission.ACCESS_COARSE_LOCATION)

EasyPerms.addPermissions(permissions)
.addCallback(object: EasyPermsCallback {
override fun onSuccess() {
// Permission accepted, success!
}

override fun onFailure(error: String) {
// Permission denied
}
})
.check(this)

```
```kotlin
override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>,
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
EasyPerms.onRequestPermissionsResult(requestCode, permissions, grantResults)
}
```

# :briefcase: License
```
Expand Down

0 comments on commit 3763ec9

Please sign in to comment.