PermissionsDispatcher 2.2.0

2016-09-26

So happy to announce that we’ve shipped PermissionsDispatcher 2.2.0.

You can see the changelog from the following.

https://github.com/hotchemi/PermissionsDispatcher/releases/tag/2.2.0

In this release we added two new improvements and did some internal clean up.

Bundle proguard rules

By using consumerProguardFiles you can bundle proguard rules to AAR.

In PermissionsDispatcher we don’t use any reflection but support native Fragment and FragmentCompat as an optional so that to prevent unexpected warning we decided to bundle rule.

See more detail in issues/172.

maxSdkVersion

Seems a little bit late but from 2.2.0 you can define permission with maxSdkVersion attribute as the following in your manifest to avoid unnecessary permission request.

1
2
3
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />

And also define corresponding method.

1
2
@NeedsPermission(value = Manifest.permission.WRITE_EXTERNAL_STORAGE, maxSdkVersion = 18)
void showGetStorage() {}

In this case generated method(showGetStorageWithCheck) doesn’t check the permission if device api level is more than 18.

See more detail in Android developers.


If you find any bug or feature request, please open an issue to issue tracker:D

https://github.com/hotchemi/PermissionsDispatcher/issues