explaingit

getactivity/xxpermissions

6,731JavaAudience · developerComplexity · 2/5Setup · easy

TLDR

An Android library that handles runtime permission requests with a short call chain, automatically managing differences across Android versions and covering special permissions like overlay and battery optimization.

Mindmap

mindmap
  root((xxpermissions))
    What it does
      Android permission requests
      Cross-version handling
    Standard permissions
      Camera microphone storage
      Location contacts
    Special permissions
      Overlay battery VPN
      Notification listener
    Integration
      JitPack Gradle
      Bundled ProGuard rules
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add camera, location, or microphone permission requests to an Android app with a simple call chain and callback.

USE CASE 2

Handle the 'don't ask again' case gracefully by detecting when a user has permanently denied a permission.

USE CASE 3

Request special Android permissions like drawing over other apps or battery optimization exemptions without manually navigating system settings.

Tech stack

JavaAndroidGradleJitPack

Getting it running

Difficulty · easy Time to first run · 30min

Add the JitPack repository and library Gradle dependency, no manual ProGuard rules needed as they are bundled.

No explicit license is stated in the repository description.

In plain English

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.

Copy-paste prompts

Prompt 1
Using XXPermissions, write Android Java code to request camera and microphone permissions together and handle the grant/deny result in a callback.
Prompt 2
How do I detect with XXPermissions whether a user has permanently denied a permission and then guide them to the right settings screen?
Prompt 3
Show me how to add XXPermissions to an Android project via JitPack and Gradle, then request the overlay permission.
Prompt 4
How does XXPermissions handle requesting special permissions like notification listener access or VPN binding that require navigating to system settings?
Open on GitHub → Explain another repo

← getactivity on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.