All Projects → karanchuri → PermissionManager

karanchuri / PermissionManager

Licence: MIT license
This Library automatically search for permission in androidmanifests file and request for the same

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to PermissionManager

soloalert
A customizable lightweight Alert Library with Material UI and awesome features.
Stars: ✭ 18 (-60%)
Mutual labels:  customizable, easy-to-use
ctxmenu
Tiny and customizable context menu generator
Stars: ✭ 20 (-55.56%)
Mutual labels:  customizable, easy-to-use
Kpermissions
A Kotlin library which helps to request runtime permissions in Android.
Stars: ✭ 253 (+462.22%)
Mutual labels:  permissions
rbac
Simple RBAC/ACL for Laravel 8 caching and permission groups.
Stars: ✭ 43 (-4.44%)
Mutual labels:  permissions
spicedb
Open Source, Google Zanzibar-inspired fine-grained permissions database
Stars: ✭ 3,358 (+7362.22%)
Mutual labels:  permissions
rhino
Agile Sandbox for analyzing Windows, Linux and macOS malware and execution behaviors
Stars: ✭ 49 (+8.89%)
Mutual labels:  customizable
pomdp-py
A framework to build and solve POMDP problems. Documentation: https://h2r.github.io/pomdp-py/
Stars: ✭ 131 (+191.11%)
Mutual labels:  easy-to-use
Spring Boot Start Current
Spring Boot 脚手架 Mybatis Spring Security JWT 权限 Spring Cache + Redis
Stars: ✭ 246 (+446.67%)
Mutual labels:  permissions
react-native-bottom-bar
Fully customizable BottomBar with unique design shape for React Native.
Stars: ✭ 74 (+64.44%)
Mutual labels:  customizable
ada-security
Ada Security - OAuth 2.0 client and server framework to secure web applications
Stars: ✭ 18 (-60%)
Mutual labels:  permissions
advancedPermissionHandler
This Android library is for handle running time permissions in simplest way!
Stars: ✭ 13 (-71.11%)
Mutual labels:  permissions
async-permissions
Easy handling for Android-M permission based on async/await
Stars: ✭ 25 (-44.44%)
Mutual labels:  permissions
au-datatable
Aurelia Datatable, A highly customizable html datatable, build for the Aurelia Framework.
Stars: ✭ 21 (-53.33%)
Mutual labels:  customizable
graphql authorize
Authorization helpers for ruby-graphql fields
Stars: ✭ 23 (-48.89%)
Mutual labels:  permissions
Rbac
Hierarchical Role-Based Access Control for Node.js
Stars: ✭ 254 (+464.44%)
Mutual labels:  permissions
ytmous
Anonymous Youtube Proxy
Stars: ✭ 60 (+33.33%)
Mutual labels:  easy-to-use
Graphql Shield
🛡 A GraphQL tool to ease the creation of permission layer.
Stars: ✭ 3,121 (+6835.56%)
Mutual labels:  permissions
Butterfly
🎨 Powerful, minimalistic, cross-platform, opensource note-taking app
Stars: ✭ 381 (+746.67%)
Mutual labels:  customizable
react-native-floating-label-input
A customizable React Native TextInput with its placeholder always shown. Includes masks, global styles, character count, and a bunch else.
Stars: ✭ 206 (+357.78%)
Mutual labels:  customizable
bastion
No description or website provided.
Stars: ✭ 11 (-75.56%)
Mutual labels:  permissions

PermissionManager

ScreenShot

This Library automatically search for permission in androidmanifests file and request for the same. Also, if request is cancelled it shows a popup window with alert to grant permission. If the app can no longer request permission due to "Don't ask again" on permission it will toast a message to grant permission from settings. All the action performed after grant or deny can be customized by overriding method shown below. Custom permission can be checked instead of all permission in androidmanifests file.

Setup: Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.karanchuri:PermissionManager:0.1.0'
}

//For Automatic Permission request.

//It Dynamically search for apps permission and request for the same.

//Below code in onCreate function.

First Import below code:

import com.karan.churi.PermissionManager.PermissionManager;
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
	permission=new PermissionManager() {};
	permission.checkAndRequestPermissions(this);
    }	

//Below code in onRequestPermissionsResult function

@Override
    public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults) {
        permission.checkResult(requestCode,permissions, grantResults);
    }

//Customized by overriding method shown below.

permission=new PermissionManager() {
            @Override
            public void ifCancelledAndCanRequest(Activity activity) {
                // Do Customized operation if permission is cancelled without checking "Don't ask again"
                // Use super.ifCancelledAndCanRequest(activity); or Don't override this method if not in use
            }

            @Override
            public void ifCancelledAndCannotRequest(Activity activity) {
                // Do Customized operation if permission is cancelled with checking "Don't ask again"
                // Use super.ifCancelledAndCannotRequest(activity); or Don't override this method if not in use
            }

            @Override
            public List<String> setPermission() {
                // If You Don't want to check permission automatically and check your own custom permission
                // Use super.setPermission(); or Don't override this method if not in use
                List<String> customPermission=new ArrayList<>();               
		customPermission.add(Manifest.permission.ACCESS_FINE_LOCATION);
                return customPermission;
            }
        };
    //To initiate checking permission
        permission.checkAndRequestPermissions(this);

//To get Granted Permission and Denied Permission

@Override
    public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults) {
        permission.checkResult(requestCode,permissions, grantResults);
        //To get Granted Permission and Denied Permission
        ArrayList<String> granted=permission.getStatus().get(0).granted;
        ArrayList<String> denied=permission.getStatus().get(0).denied;
    }
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].