Android M Permissions - Fast & Simple.

Overview

Android Permission Check Library

Status


[![Build Status](https://travis-ci.org/drilonreqica/Android-Permission-Check-Library.svg?branch=develop)](https://travis-ci.org/drilonreqica/Android-Permission-Check-Library) [ ![Download](https://api.bintray.com/packages/drilonreqica/maven/android-permission-check-library/images/download.svg) ](https://bintray.com/drilonreqica/maven/android-permission-check-library/_latestVersion) [![API](https://img.shields.io/badge/API-9%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=9) #### Adding the library as depndency

Add library dependency using gradle:

compile 'com.reqica.drilon:android-permission-check-library:2.0.0'

Add library dependency using maven:

<dependency>
  <groupId>com.reqica.drilon</groupId>
  <artifactId>android-permission-check-library</artifactId>
  <version>2.0.0</version>
  <type>pom</type>
</dependency>

Add library dependency using ivy:

<dependency org='com.reqica.drilon' name='android-permission-check-library' rev='2.0.0'>
  <artifact name='android-permission-check-library' ext='pom' ></artifact>
</dependency>

Usage

Initialize Class CheckPermission:

CheckPermission checkPermission = new CheckPermission(context);

If you want to check and ask for a Single permission, call:

checkPermission.checkOne(@NonNull final String permission, @Nullable final String dialogMessage)

The 1st parameter is the actual permission, and the 2nd one is an optional Dialog Message that you can show to the user as an extra dialog, for better explanation/reason of the permission asked.


If you want to check and ask for Multiple permissions at once, call:

checkPermission.checkMultiple(@NonNull final String[] permissions, @Nullable final String dialogMessage)

The 1st parameter is the actual permission, and the 2nd one is an optional Dialog Message that you can show to the user as an extra dialog, for better explanation/reason of the permissions asked.


If you want to go to the settings screen and see which permission are Granted and which ones are not, call:

checkPermission.openPermissionsSettings(@NonNull String packageName) {

The parameter you need to give here is the actual root packageName of the app.

General Knowledge

To be able to check/ask for the permissions you first need to declare them in your projects AndroidManifest.xml

You might also like...
Dead simple EventBus for Android made with Kotlin and RxJava 2

KBus Super lightweight (13 LOC) and minimalistic (post(), subscribe(), unsubscribe()) EventBus written with idiomatic Kotlin and RxJava 2 KBus in 3 st

Simple android library to present an animated ferris wheel
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Simple Android Library, that provides easy way to start the Activities with arguments.

Warning: Library is not maintained anymore. If you want to take care of this library, propose it via Pull Request. It needs adjustmensts for newer ver

A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄
A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄

Slide To Act A simple Slide to Unlock Material widget for Android, written in Kotlin 🇰. Getting Started Example Features Attributes area_margin inner

Simple Kotlin Multiplatform PrayerTimes App for iOS and Android

Kotlin Multiplatform ___ _______ ___ / _ \_______ ___ _____ ___/_ __(_)_ _ ___ ___ / _ | __

A lightweight and simple Kotlin library for deep link handling on Android 🔗.

A lightweight and simple Kotlin library for deep link handling on Android 🔗.

This library is a set of simple wrapper classes that are aimed to help you easily access android device information.
This library is a set of simple wrapper classes that are aimed to help you easily access android device information.

SysInfo Simple, single class wrapper to get device information from an android device. This library provides an easy way to access all the device info

An example of a test task for creating a simple currency converter application for the Android platform. The app is developed using Kotlin, MVI, Dagger Hilt, Retrofit, Jetpack Compose.
An example of a test task for creating a simple currency converter application for the Android platform. The app is developed using Kotlin, MVI, Dagger Hilt, Retrofit, Jetpack Compose.

Simple Currency Converter Simple Currency Converter Android App by Isaev Semyon An example of a test task for creating a simple currency converter app

A simple project that describes the relationship between the view and it's viewmodel in android development
A simple project that describes the relationship between the view and it's viewmodel in android development

View-ViewModel-Communication A simple project that describes the relationship between the view and it's viewmodel in android development In MVVM archi

Owner
Drilon Reçica
Passionate Android & Flutter Magician
Drilon Reçica
Simple, fast, efficient logging facade for Android apps

µlog Simple, fast, and efficient logging facade for Android apps. Inspired by Timber and Logcat. Features Lazy message evaluation Pluggable backends (

Danny Lin 9 Oct 21, 2022
[Android Library] Get easy access to device information super fast, real quick

DeviceInfo-Sample Simple, single class wrapper to get device information from an android device. This library provides an easy way to access all the d

Anitaa Murthy 193 Nov 20, 2022
Clickstream - A Modern, Fast, and Lightweight Android Library Ingestion Platform.

Clickstream is an event agnostic, real-time data ingestion platform. Clickstream allows apps to maintain a long-running connection to send data in real-time.

Gojek 60 Dec 24, 2022
Fast Seek for ExoPlayer

FastExoPlayerSeeker Introduction Adds fast seeking for exoplayer. (Note: it also depends on the amount of video encoding, mainly IDR Frames) How to in

Jan Rabe 40 Dec 27, 2022
A fast, lightweight, entity component system library written in Kotlin.

Fleks A fast, lightweight, entity component system library written in Kotlin. Motivation When developing my hobby games using LibGDX, I always used As

Simon 66 Dec 28, 2022
A fast-prototyping command line system

Kotlin-er CLI A different take on making command line programs, emphasizing development speed over customization Status Auto-deployed to Maven Central

Lightning Kite 22 Jan 22, 2022
Feature flags solution that is fast, lean, and open-source.

FFS Feature flags solution that is fast, lean, and open-source. Documentation Full documentation available at https://doist.github.io/ffs/. Project FF

Doist 84 Oct 31, 2022
Koin Annotations - help declare Koin definition in a very fast and intuitive way, and generate all underlying Koin DSL for you

The goal of Koin Annotations project is to help declare Koin definition in a very fast and intuitive way, and generate all underlying Koin DSL for you. The goal is to help developer experience to scale and go fast ?? , thanks to Kotlin Compilers.

insert-koin.io 68 Jan 6, 2023
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android

Vanilla Place Picker Vanilla Place Picker provides a UI that displays an interactive map to get the place details and Autocomplete functionality, whic

MindInventory 115 Dec 21, 2022
Simple PGP encryption/decryption on android.

Android-PGP Introduction Adds PGP encryption and decryption support. How to install repositories { maven { url "https://jitpack.io" }

Jan Rabe 51 Dec 10, 2022