Add camera, location, or microphone permission requests to an Android app with a simple call chain and callback.
Handle the 'don't ask again' case gracefully by detecting when a user has permanently denied a permission.
Request special Android permissions like drawing over other apps or battery optimization exemptions without manually navigating system settings.
Add the JitPack repository and library Gradle dependency, no manual ProGuard rules needed as they are bundled.
XXPermissions is an Android library that simplifies the process of requesting user permissions inside mobile apps. Android requires apps to ask the user's consent before accessing things like the camera, microphone, location, or storage, and the rules around how to ask have changed significantly across Android versions. This library handles those differences automatically, with stated support up to Android 16. The main appeal is a short, readable call chain. A developer adds a few lines of code, specifies which permissions the app needs, and attaches a callback that receives two lists: the permissions that were granted and the ones that were denied. From there the app can check whether everything was approved or branch on specific failures. There is also a helper to detect whether a user has checked the "don't ask again" box on a particular permission, which changes what the app should do next. The library also covers special permissions that sit outside the standard Android flow, such as the overlay permission that allows drawing on top of other apps, battery optimization exemptions, usage stats access, notification listener access, VPN binding, and others. These typically require navigating the user to a system settings screen rather than showing a dialog, and XXPermissions handles that routing. Integration is through JitPack. A developer adds the JitPack repository to the Gradle configuration and then adds the library as a dependency. There is a separate companion library for device-specific compatibility. Obfuscation rules are bundled so no manual ProGuard setup is needed. The README is primarily in Chinese, with an English version linked from the top. It includes screenshots of the demo app covering over a dozen different permission types, along with helper methods for checking whether permissions are currently granted, comparing permission names, and jumping directly to the relevant settings page.
← getactivity on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.