PermissionsManager

Additional

Language
Kotlin
Version
N/A
Created
Feb 25, 2017
Updated
Apr 3, 2017 (Retired)
Owner
Adam McNeilly (AdamMc331)
Contributor
Adam McNeilly (AdamMc331)
1
Activity
Badge
Generate
Download
Source code

PermissionsManager Library

This library contains a base Fragment and Activity class that allow for easier handling of Runtime Permission requests and their various outcomes (granted, denied, blocked).

Usage

To have access to the library, add the dependency to your build.gradle:

 compile 'com.adammcneilly:permissionsmanager:1.0.0'

Implementation

The basic steps to implement this library are as follows:

  1. Extend PermissionsActivity or PermissionsFragment.
  2. Implement (or create a class that implements) PermissionsManager.
  3. Add the implementation of your permissions calls! This may very depending on what you want to do with the results. For an example, look at the permissionsCheck() method in the MainActivity of the sample.

PermissionsManager Interface

The PermissionsManager interface has three callback methods.

  1. onPermissionGranted - The user granted the app permission for a given feature.
  2. onPermissionDenied - The user denied the app permission for a given feature.
  3. onPermissionBlocked - The user denied and checked "Never ask again." for the given feature.

Credits & Contact

This library was created by Adam McNeilly.

Version History

1.0.0

  • Initial release.

License

The PermissionsManager library is available under the MIT License. You are free to modify and enhance it in any way. If you submit a pull request, please add your name into the credits section!