Skip to content

PermissionX is a tool for simplify the permissions request in android

Notifications You must be signed in to change notification settings

djzhao627/PermissionX

Repository files navigation

PermissionX

PermissionX是一个可以简化权限申请的框架

PermissionX is a tool for simplify the permissions request in android

Usage

  1. Add it in your root build.gradle at the end of repositories:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the dependency in the build.gradle of the Module
dependencies {
        implementation 'com.github.djzhao627:PermissionX:1.0'
}
  1. do permissions request
PermissionX.request(
    this,
    Manifest.permission.CALL_PHONE,
    Manifest.permission.READ_CONTACTS
) { allGranted, deniedList ->
    if (allGranted) {
        // continue to work...
    } else {
        Toast.makeText(this, "You Denied $deniedList", Toast.LENGTH_SHORT).show()
    }
}

About

PermissionX is a tool for simplify the permissions request in android

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages