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

Badge

View in Github Github project information
Starred: 75
Forks: 13
Watchers: 18
Open Issues: 1

Snapshot pictures

No snapshot for this library yet.

Description

Android Marshmallow permissions made easy

USAGE:

  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