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

Permissify

> 编程语言
开源

简化 Android 权限

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

工具介绍

简化 Android 权限

Permissify - Simplifying Android Permissions

Permissify is an Android library that makes requesting permissions at runtime much easier.

Android Marshmallow added a new functionality to let users grant permissions when running an app instead of granting them all when installing it. This approach gives the user more control but requires developers to add lots of boilerplate code to support it.

Overview

  • Tested in production - over 1000 000 installs in the Holidaycheck app
  • Handles showing Rationale & Permission denied dialogs
  • Consistent API across android versions
  • Perfectly fine with configuration changes
  • API for activity and fragment
  • Works great without hacking android
  • No memory leaks guaranteed
  • Supports Android 15+

Screenshots

Add it to your project

Include the library in your build.gradle

groovy
dependencies{
    compile 'com.holidaycheck:permissify:1.0.0'
}

or to your pom.xml if you are using Maven

xml

    com.holidaycheck
    permissify
    1.0.0
    aar

Configuration

To start using the library you need to extend your activity from PermissifyActivity and configure library in your custom android.app.Application.

Minimum configuration to run is presented below. You basically need to provide translations for every Permission group that is used in your app.

…

Full configuration looks like this, but mostly you will use minimum config. You can customize default options for every permission call, and dialogs appearance. See javadoc for more details.

…

Usage

To request specific permission you need make a call to PermissifyManager. Every call is associated with your unique RequestId.

java
getPermissifyManager().callWithPermission(this, LOCATION_PERMISSION_REQUEST_ID, android.Manifest.permission.ACCESS_FINE_LOCATION);

the result and the current permission status is provided via

java
@Override
public void onCallWithPermissionResult(int callId, PermissifyManager.CallRequestStatus status) {
    if (callId == LOCATION_PERMISSION_REQUEST_ID) {
        switch (status) {
            case PERMISSION_GRANTED:
                getUserLocation();
            break
            case PERMISSION_DENIED_ONCE:
            //do some custom logic
            break;
            case PERMISSION_DENIED_FOREVER:
            //do some custom logic
            case SHOW_PERMISSION_RATIONALE:
            //do some custom logic
        }
    }
}

If you want to request permission from a fragment make sure it implements PermissifyManager.Callback

There are two types of dialogs:

  • Rationale dialog - is shown in situations where the user might need an explanation why the app needs this permission
  • Deny dialog - is shown when the user permanently denied requested permission

There are number of options that you can change when requesting for permission using additional parameter:

java
getPermissifyManager().callWithPermission(this, LOCATION_PERMISSION_REQUEST_ID, android.Manifest.permission.ACCESS_FINE_LOCATION,
            new PermissionCallOptions.Builder()
                .withDefaultDenyDialog(false)
                .withRationaleEnabled(false)
                .build());

Current limitations

  • Multiple permission request at once is not currently supported (will be added soon)

Do you want to contribute?

Feel free to add any cool and useful feature to the library.

License

The MIT License (MIT)

Copyright (c) 2016 HolidayCheck

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

Javaandroid-library

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

> 工具信息

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

> 相关工具

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