Skip to content

RedTomatoCat/PermissionR

Repository files navigation

Android 权限申请框架

PermissionR

项目配置环境
*gradle-6.6.1-bin.zip
*Kotlin 1.4.0
*AndroidX
*compileSdkVersion 29
*buildToolsVersion "29.0.3"

UI

*1、PermissionResultDialog

USE

Maven

implementation 'com.redcattomato.permissionr.core:PermissionR:1.0.3'

使用场景

Activity, Fragment, Dialog

Exp

PermissionRBuilder(this)
            .permission(
                    Manifest.permission.CAMERA,
                    Manifest.permission.READ_EXTERNAL_STORAGE,
            ).setListener(object : PermissionRListener {
                    override fun onReady(permissionInfoList: List<PermissionRInfo>) {
                        //Do your thing
                    }

                    override fun onFailed(permissionList: List<String>) {
                        //Do your thing
                    }

                    override fun allSuccess() {
                        //Do your thing
                    }

                })
                .useDialog(true)
                .must(true)
                .build()

About

Android权限申请框架

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages