Skip to content

Commit 7a3ff98

Browse files
Release 2.0.0
1 parent 6556020 commit 7a3ff98

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,59 @@ dependencies {
2727
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.4.0'
2828
compile 'org.androidannotations:androidannotations-api:4.3.1'
2929
annotationProcessor 'org.androidannotations:androidannotations:4.3.1'
30-
annotationProcessor 'com.github.AleksanderMielczarek:AndroidAnnotationsPermissionsDispatcherPlugin:1.0.0'
30+
annotationProcessor 'com.github.AleksanderMielczarek:AndroidAnnotationsPermissionsDispatcherPlugin:2.0.0'
3131
}
3232
```
3333

3434
> #Please notice that PermissionsDispatcher is above AndroidAnnotations.
3535
36-
Finally, you should not call the PermissionDispatcher delegate class static methods anymore, this
36+
## Example
37+
38+
```java
39+
@EActivity(R.layout.activity_main)
40+
@RuntimePermissions
41+
public class MainActivity extends AppCompatActivity {
42+
43+
@Click(R.id.permissionButton)
44+
protected void askForPermission() {
45+
showCamera();
46+
}
47+
48+
@NeedsPermission(Manifest.permission.CAMERA)
49+
protected void showCamera() {
50+
Toast.makeText(this, "Permission for camera granted", Toast.LENGTH_SHORT).show();
51+
}
52+
53+
@OnShowRationale(Manifest.permission.CAMERA)
54+
protected void showRationaleForCamera(PermissionRequest request) {
55+
Toast.makeText(this, "OnShowRationale for camera", Toast.LENGTH_SHORT).show();
56+
request.proceed();
57+
}
58+
59+
@OnNeverAskAgain(Manifest.permission.CAMERA)
60+
protected void showNeverAskForCamera() {
61+
Toast.makeText(this, "OnNeverAskAgain for camera", Toast.LENGTH_SHORT).show();
62+
}
63+
64+
}
65+
```
66+
67+
# Migrating to 2.0.0
68+
69+
Finally, you should not call the PermissionsDispatcher delegate class static methods anymore, this
3770
plugin will generate those calls for you. Just call the method which was annotated with `@NeedsPermission`. Overriding `onRequestPermissionsResult` should also be removed completely.
3871
See the example project for code.
3972

73+
## Thanks
74+
75+
* **WonderCsabo** for integrating plugin completely with PermissionsDispatcher
76+
4077
## Changelog
4178

79+
### 2.0.0 (2017-07-12)
80+
81+
- fully integration with PermissionsDispatcher
82+
4283
### 1.0.0 (2017-07-02)
4384

4485
- rename module name
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.1.0
1+
version=2.0.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.1.0
1+
version=2.0.0

dependencies.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ext {
2-
versionMajor = 1
2+
versionMajor = 2
33
versionMinor = 0
44
versionFix = 0
55

0 commit comments

Comments
 (0)