Skip to content

Commit cd609e5

Browse files
Release 2.0.3
1 parent 28e3ed5 commit cd609e5

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ Add the dependency
2222

2323
```groovy
2424
dependencies {
25-
//PermissionsDispatcher has to be above AndroidAnnotations
2625
compile 'com.github.hotchemi:permissionsdispatcher:2.4.0'
2726
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.4.0'
2827
compile 'org.androidannotations:androidannotations-api:4.3.1'
2928
annotationProcessor 'org.androidannotations:androidannotations:4.3.1'
30-
annotationProcessor 'com.github.AleksanderMielczarek:AndroidAnnotationsPermissionsDispatcherPlugin:2.0.2'
29+
annotationProcessor 'com.github.AleksanderMielczarek:AndroidAnnotationsPermissionsDispatcherPlugin:2.0.3'
3130
}
3231
```
3332

34-
> #Please notice that PermissionsDispatcher is above AndroidAnnotations.
35-
3633
## Example
3734

3835
```java
@@ -50,6 +47,11 @@ public class MainActivity extends AppCompatActivity {
5047
Toast.makeText(this, "Permission for camera granted", Toast.LENGTH_SHORT).show();
5148
}
5249

50+
@OnPermissionDenied(Manifest.permission.CAMERA)
51+
protected void onPermissionDeniedCamera() {
52+
Toast.makeText(this, "@OnPermissionDenied for camera", Toast.LENGTH_SHORT).show();
53+
}
54+
5355
@OnShowRationale(Manifest.permission.CAMERA)
5456
protected void showRationaleForCamera(PermissionRequest request) {
5557
Toast.makeText(this, "OnShowRationale for camera", Toast.LENGTH_SHORT).show();
@@ -67,7 +69,7 @@ public class MainActivity extends AppCompatActivity {
6769
# Migrating to 2.x.x
6870

6971
Finally, you should not call the PermissionsDispatcher delegate class static methods anymore, this
70-
plugin will generate those calls for you. Just call the method which was annotated with `@NeedsPermission`. Overriding `onRequestPermissionsResult` should also be removed completely.
72+
plugin will generate those calls for you. Just call the method which was annotated with `@NeedsPermission`. Overriding `onRequestPermissionsResult` and `onActivtyResult` (special permissions) should also be removed completely.
7173
See the example project for code.
7274

7375
## Thanks
@@ -76,6 +78,10 @@ See the example project for code.
7678

7779
## Changelog
7880

81+
### 2.0.3 (2017-08-09)
82+
83+
- fix generating duplicated dispatchers (#10)
84+
7985
### 2.0.2 (2017-08-08)
8086

8187
- fix special permissions handling (#9)

app/src/main/java/com/github/aleksandermielczarek/androidannotationspermissionsdispatcherpluginexample/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected void showCamera() {
3434
}
3535

3636
@OnPermissionDenied(Manifest.permission.CAMERA)
37-
protected void onPermissionDenieCamera() {
37+
protected void onPermissionDeniedCamera() {
3838
Toast.makeText(this, "@OnPermissionDenied for camera", Toast.LENGTH_SHORT).show();
3939
}
4040

dependencies.gradle

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

66
minSdkVersionVersion = 16
77
sdkVersion = 26

0 commit comments

Comments
 (0)