webpartners / WPAndroidPermissions
Category: Permissions
Minimum SDK Level: Marshmallow (22 | 6.0)


View in Github Github project information
Starred: 0
Forks: 0
Watchers: 0
Open Issues: 0

Snapshot pictures

No snapshot for this library yet.


Android Marshmallow permissions made easy


  1. Add annotations with the desired permissions:

    @ActivityWithRuntimePermissions // at class level for Activities
    @FragmentWithRuntimePermissions // at class level for Fragments
    @HostFragmentWithPermissions // if an Activity hosts Fragment that requires permissions
    @NeedPermissions(Manifest.permission.YOUR_PERMISSION) // at function level
  2. Add to the invocation of your Activity/Fragments the suffix: _Generated, like:

    startActivity(new Intent(MainActivity.this, ActivityWithPermission_Generated.class));
  3. Implement the callback interface on your classes for better permission feedback:

    MyActivity implements PermissionRequestResponse