All Projects → android-notes → Onekeyperm

android-notes / Onekeyperm

Licence: mit
一键申请Android权限,不依赖任何业务Activity。小巧、简约、强悍

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Onekeyperm

Shiro Action
基于 Shiro 的权限管理系统,支持 restful url 授权,体验地址 :
Stars: ✭ 357 (+537.5%)
Mutual labels:  permission
Pycasbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Python
Stars: ✭ 625 (+1016.07%)
Mutual labels:  permission
Php Casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in PHP .
Stars: ✭ 865 (+1444.64%)
Mutual labels:  permission
Casbin Rs
An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
Stars: ✭ 375 (+569.64%)
Mutual labels:  permission
Casbin.net
An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
Stars: ✭ 535 (+855.36%)
Mutual labels:  permission
Universaltoast
简洁优雅可点击的toast控件,无BadTokenException风险,关闭通知权限依然正常显示。An elegant and flexible toast which can handle click event , avoid BadTokenException and run fine without notification permission
Stars: ✭ 748 (+1235.71%)
Mutual labels:  permission
Django Permission
[Not maintained] An enhanced permission system which support object permission in Django
Stars: ✭ 305 (+444.64%)
Mutual labels:  permission
Vue Cli3.0 Vueadmin
基于vue-cli3.0+vue+elementUI+vuex+axios+权限管理的后台管理系统
Stars: ✭ 1,002 (+1689.29%)
Mutual labels:  permission
Needs
🌂 An easy way to implement modern permission instructions popup.
Stars: ✭ 546 (+875%)
Mutual labels:  permission
Runtimepermission
Simpliest way to ask runtime permissions on Android, no need to extend class or override permissionResult method, choose your way : Kotlin / Coroutines / RxJava / Java7 / Java8
Stars: ✭ 860 (+1435.71%)
Mutual labels:  permission
Androidacp
一句话搞定,简化Android 6.0 系统复杂的权限操作
Stars: ✭ 387 (+591.07%)
Mutual labels:  permission
Sppermissions
Ask permissions with ready-use interface. You can check status permission and if it has been requested before. Support SwiftUI.
Stars: ✭ 4,701 (+8294.64%)
Mutual labels:  permission
Andpermission
🍓 Permissions manager for Android platform.
Stars: ✭ 6,567 (+11626.79%)
Mutual labels:  permission
Permissionmanager
Admin interface for managing users, roles, permissions, using Backpack CRUD
Stars: ✭ 363 (+548.21%)
Mutual labels:  permission
Androidutilcode
AndroidUtilCode 🔥 is a powerful & easy to use library for Android. This library encapsulates the functions that commonly used in Android development which have complete demo and unit test. By using it's encapsulated APIs, you can greatly improve the development efficiency. The program mainly consists of two modules which is utilcode, which is commonly used in development, and subutil which is rarely used in development, but the utils can be beneficial to simplify the main module. 🔥
Stars: ✭ 30,239 (+53898.21%)
Mutual labels:  permission
Core Nestjs
A simple application demonstrating the basic usage of permissions with NestJS (JWT, Passport, Facebook, Google+, User, Group, Permission)
Stars: ✭ 347 (+519.64%)
Mutual labels:  permission
Devutils
🔥 ( 持续更新,目前含 160+ 工具类 ) DevUtils 是一个 Android 工具库,主要根据不同功能模块,封装快捷使用的工具类及 API 方法调用。该项目尽可能的便于开发人员,快捷、高效开发安全可靠的项目。
Stars: ✭ 680 (+1114.29%)
Mutual labels:  permission
Matrixauth
High-performance lightweight distributed permission system. 高性能轻量级分布式权限系统。
Stars: ✭ 41 (-26.79%)
Mutual labels:  permission
Arek
AREK is a clean and easy way to request any kind of iOS permission (with some nifty features 🤖)
Stars: ✭ 947 (+1591.07%)
Mutual labels:  permission
Hzdtf.foundation.framework
基础框架系统,支持.NET和.NET Core平台,语言:C#,DB支持MySql和SqlServer,主要功能有抽象持久化、服务层,将业务基本的增删改查抽离复用;提供代码生成器从DB生成实体、持久化、服务以及MVC控制器,每层依赖接口,并需要在客户端将对应实现层用Autofac程序集依赖注入,用AOP提供日志跟踪、事务、模型验证等。对Autofac、Redis、RabbitMQ封装扩展;DB访问提供自动主从访问,Redis客户端分区。特别适合管理系统。
Stars: ✭ 22 (-60.71%)
Mutual labels:  permission

OneKeyPerm

一键申请Android权限

OneKeyPerm接入说明

OneKeyPerm不依赖任何业务Activity,支持多进程,只需一句静态代码就可以了

例如

申请权限被拒绝后 不会 自动开启设置页面让用户手动开启权限

OneKeyPerm.request(application, Manifest.permission.CAMERA, "您需要允许相机权限,否则无法使用扫码功能", new OneKeyPerm.OnPermResultListener() {
                    @Override
                    public void onPermResult(String perm, boolean isGrant) {
                        Toast.makeText(MainActivity.this, "请求相机权限 " + isGrant, Toast.LENGTH_SHORT).show();
                    }
                });

或者

申请权限被拒绝后  自动开启设置页面让用户手动开启权限

OneKeyPerm.request(application, Manifest.permission.CAMERA, "您需要允许相机权限,否则无法使用扫码功能", new OneKeyPerm.OnPermResultListener() {
                    @Override
                    public void onPermResult(String perm, boolean isGrant) {
                        Toast.makeText(MainActivity.this, "请求相机权限 " + isGrant, Toast.LENGTH_SHORT).show();
                    }
                },true);

原理分析

  • 每次通过context启动透明Activity(PermissionActivity)请求权限

  • 当权限被拒绝后启动另一个透明Activity (WatchAuthorizationActivity),在WatchAuthorizationActivity中再次启动应用详情设置Activity,然后在WatchAuthorizationActivityonActivityResult方法中再次检查是否已经手动授权,并通过Binder(解决多进程问题)通知调用者

备注:收回授权后Android会重启App

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].