All Projects → nabinbhandari → Android Permissions

nabinbhandari / Android Permissions

Library for easy handling of android run-time permissions.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Permissions

Xtoolkit.whitelabel
Modular MVVM framework for fast creating powerful cross-platform applications with Xamarin.
Stars: ✭ 22 (-92.93%)
Mutual labels:  library, permissions
Permissionsflow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 49 (-84.24%)
Mutual labels:  library, permissions
Unix Permissions
Swiss Army knife for Unix permissions
Stars: ✭ 106 (-65.92%)
Mutual labels:  library, permissions
Retentioneering Tools
Retentioneering: product analytics, data-driven customer journey map optimization, marketing analytics, web analytics, transaction analytics, graph visualization, and behavioral segmentation with customer segments in Python. Opensource analytics, predictive analytics over clickstream, sentiment analysis, AB tests, machine learning, and Monte Carlo Markov Chain simulations, extending Pandas, Networkx and sklearn.
Stars: ✭ 291 (-6.43%)
Mutual labels:  library
Paper Onboarding
PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion
Stars: ✭ 3,147 (+911.9%)
Mutual labels:  library
Adafruit Pwm Servo Driver Library
Adafruit PWM Servo Driver Library
Stars: ✭ 300 (-3.54%)
Mutual labels:  library
Gerador Validador Cpf
Biblioteca JS open-source para gerar e validar CPF.
Stars: ✭ 312 (+0.32%)
Mutual labels:  library
Extramaputils
🌍 the simple utility for google maps in android
Stars: ✭ 293 (-5.79%)
Mutual labels:  library
Protocol
The Hoa\Protocol library.
Stars: ✭ 308 (-0.96%)
Mutual labels:  library
Python Iocextract
Defanged Indicator of Compromise (IOC) Extractor.
Stars: ✭ 300 (-3.54%)
Mutual labels:  library
Bounce
Bounce is a 3D physics engine for games.
Stars: ✭ 300 (-3.54%)
Mutual labels:  library
React Magic Hat
🎩✨Library to implement the Magic Hat technique, blazingly fast 🚀
Stars: ✭ 297 (-4.5%)
Mutual labels:  library
To lang
Translate Ruby strings and arrays with Google Translate.
Stars: ✭ 303 (-2.57%)
Mutual labels:  library
Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: ✭ 296 (-4.82%)
Mutual labels:  library
Regex
The Hoa\Regex library.
Stars: ✭ 308 (-0.96%)
Mutual labels:  library
Motionia
Motionia is a lightweight simplified on demand animation library!
Stars: ✭ 294 (-5.47%)
Mutual labels:  library
Fancy on boarding
Fancy OnBoarding Screen Library
Stars: ✭ 307 (-1.29%)
Mutual labels:  library
Edlib
Lightweight, super fast C/C++ (& Python) library for sequence alignment using edit (Levenshtein) distance.
Stars: ✭ 298 (-4.18%)
Mutual labels:  library
Retry
♻️ The most advanced interruptible mechanism to perform actions repetitively until successful.
Stars: ✭ 294 (-5.47%)
Mutual labels:  library
Libtorrent
an efficient feature complete C++ bittorrent implementation
Stars: ✭ 3,531 (+1035.37%)
Mutual labels:  library

Android Runtime Permission Library

Easily handle runtime permissions in android.

  • Very short code.
  • Handle "don't ask again" condition.
  • Can request from any context (Activity, Service, Fragment, etc).
  • Can check multiple permissions at once.
  • Light weight (12 KB).
  • Used by hundreds of developers.
  • Quick support.
  • Open source and fully customizable.

Dependency:

Gradle (Jcenter)

implementation 'com.nabinbhandari.android:permissions:3.8'

Usage:

First declare your permissions in the manifest. Example:

<uses-permission android:name="android.permission.CAMERA" />

Single permission:

Permissions.check(this/*context*/, Manifest.permission.CALL_PHONE, null, new PermissionHandler() {
    @Override
    public void onGranted() {
        // do your task.
    }
});

Multiple permissions:

String[] permissions = {Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE};
Permissions.check(this/*context*/, permissions, null/*rationale*/, null/*options*/, new PermissionHandler() {
    @Override
    public void onGranted() {
        // do your task.
    }
});

Customized permissions request:

String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION};
String rationale = "Please provide location permission so that you can ...";
Permissions.Options options = new Permissions.Options()
        .setRationaleDialogTitle("Info")
        .setSettingsDialogTitle("Warning");

Permissions.check(this/*context*/, permissions, rationale, options, new PermissionHandler() {
    @Override
    public void onGranted() {
        // do your task.
    }

    @Override
    public void onDenied(Context context, ArrayList<String> deniedPermissions) {
        // permission denied, block the feature.
    }
});
  • You can also override other methods like onDenied, onJustBlocked, etc if you want to change the default behaviour.
  • Dialog messages and texts can be modified by building the options parameter.
  • See documentation in the source code for more customizations.

If you find this library useful, please consider starring this repository from the top of this page.


LICENSE

Copyright 2018 Nabin Bhandari

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.

Developed by:

Nabin Bhandari
Email | Facebook | Paypal

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].