Skip to content

2.2.0

Compare
Choose a tag to compare
@hotchemi hotchemi released this 25 Sep 05:42
· 517 commits to master since this release
  • Support maxSdkVersion #204.
  • Add ProGuard support #175.
  • Some internal cleanup.

maxSdkVersion

Define permission with maxSdkVersion attribute as the following in your manifest.

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

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

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

See more detail in Android developers.