A wrapper library to simplify Android M+ system permissions logic with annotations and callbacks.
EasyPermissions is an Android library that simplifies the implementation of runtime permissions for apps targeting Android Marshmallow (API 23) and higher. It provides helper methods, annotations, and callbacks to reduce boilerplate code and handle complex permission scenarios like permanent denials. The library abstracts away the intricacies of the Android permissions API, allowing developers to focus on app functionality.
Android developers building apps that require runtime permissions on Android M and above, particularly those looking to reduce permission-handling boilerplate and improve code clarity.
Developers choose EasyPermissions because it dramatically simplifies Android's verbose permission system with a clean, intuitive API. Its annotation-driven approach and built-in handling for edge cases like "Never Ask Again" save development time and reduce common permission-related bugs.
Simplify Android M system permissions
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Methods like `hasPermissions()` and `requestPermissions()` handle multiple permissions with minimal code, as shown in the basic usage example where CAMERA and LOCATION are requested together.
The `@AfterPermissionGranted` annotation automatically executes methods after permissions are granted, simplifying permission-dependent logic without manual callbacks.
Includes `somePermissionPermanentlyDenied()` and `AppSettingsDialog` to guide users to app settings for permanently denied permissions, addressing a critical edge case in permission flows.
The `PermissionRequest.Builder` allows setting custom text, buttons, and themes for rationale dialogs, providing flexibility in user interaction design.
Native Kotlin support requires a separate ktx extension library, adding dependency complexity and fragmentation for Kotlin developers.
As admitted in the README, `somePermissionPermanentlyDenied()` only works after the permission has been denied and the callback is received, limiting its use in initial permission checks.
Methods annotated with `@AfterPermissionGranted` must be void and without input parameters, which can hinder state management and require workarounds like using savedInstanceState.