Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
version changed
  • Loading branch information
NoNews authored Nov 5, 2017
1 parent e67605f commit dc4fd44
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ Simple Android library for permissions request. Consists of only one class.
### Why NoPermission:
* Not a framework. It's just one class
* Never ask again feature
* Automatic check whether the permission is granted or not
* Automatic check whether the permission is granted or not (don't need to check api version)
* Fragment support


### Gradle

compile 'ru.alexbykov:nopermission:1.1.0'
compile 'ru.alexbykov:nopermission:1.1.1'

### Install

```java
PermissionHelper permissionHelper = new PermissionHelper(this); //getActivity in fragments
PermissionHelper permissionHelper = new PermissionHelper(this); //activity or fragment

permissionHelper.check(Manifest.permission.READ_CONTACTS)
.onSuccess(this::onSuccess)
Expand All @@ -32,7 +33,7 @@ permissionHelper.check(Manifest.permission.READ_CONTACTS)
.run();
```

Multiply permissions:
##### Multiply permissions:

```java

Expand All @@ -43,7 +44,7 @@ Multiply permissions:
.run();
```

OnActivityResult:
##### onRequestPermissionsResult:

```java
@Override
Expand All @@ -52,7 +53,7 @@ OnActivityResult:
}
```

OnDestroy:
##### onDestroy:
```java
@Override
protected void onDestroy() {
Expand All @@ -68,8 +69,8 @@ OnDestroy:
Be sure to review the [changes list](https://github.com/NoNews/NoPermission/releases) before updating the version

#### TODO
* Support permission result from Fragments
* Unit tests
* Dialog with explain, why application need permission


#### Contributing
Expand Down

0 comments on commit dc4fd44

Please sign in to comment.