百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

HeiPermission

> 编程语言
开源

Hei 一个代码就搞定了 Android M 动态权限检测。信不信由你,反正我用了。

367 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Hei 一个代码就搞定了 Android M 动态权限检测。信不信由你,反正我用了。

HeiPermission

Android M 动态权限解决方案,Let You Fly!

Demo_APK下载

动图(相信你会Star的)

使用方式

  1. 导入permlib到Project中,app添加库依赖。(建议拷贝源码,可根据需求定制)

  2. 奇淫技巧:

    checkPermission(CheckPermListener listener, int resString, String... mPerms)
    
        - listener:    权限全部通过接口回调,只检测没有后续行为可 null
        - resString:    权限用途的说明提示(引导用户开启权限)
        - mPerms:    申请的高危权限组(可同时申请多个)
    
  3. 下面列出简单的使用方法

Activity中:

首先需要检测权限的 Activity extends PermissionActivity

checkPermission(new CheckPermListener() {
                @Override
                public void superPermission() {
                   TODO : 需要权限去完成的功能
                }
            },R.string.camera, 
            Manifest.permission.CAMERA,
            Manifest.permission.WRITE_EXTERNAL_STORAGE);

Fragment中:

 首先Fragment依存的 Activity extends PermissionActivit

((PermissionActivity)getActivity()).checkPermission(
	new PermissionActivity.CheckPermListener() {
        @Override
        public void superPermission() {
             TODO : 需要权限去完成的功能
        }
    },R.string.camera, Manifest.permission.CAMERA);

感谢开源库

EasyPermissions

联系作者

邮箱:[email protected] #License

Copyright 2016 forJrking

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言