All Projects → innfinity-am → Permissionsflow

innfinity-am / Permissionsflow

Licence: apache-2.0
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Permissionsflow

Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (+128.57%)
Mutual labels:  android-app, kotlin-coroutines, android-architecture, android-application, android-development, android-sdk
Android Inappbilling
A sample which uses Google's Play Billing Library and it does InApp Purchases and Subscriptions.
Stars: ✭ 114 (+132.65%)
Mutual labels:  android-app, android-architecture, android-application, android-development, android-sdk
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (+179.59%)
Mutual labels:  android-app, android-architecture, android-application, android-development, android-sdk
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (+114.29%)
Mutual labels:  android-app, android-architecture, android-application, android-development, android-sdk
Android-daily-read-tips
log for articles and info in android for every developer
Stars: ✭ 13 (-73.47%)
Mutual labels:  android-sdk, android-development, android-application, android-architecture, android-app
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (+346.94%)
Mutual labels:  android-app, android-architecture, android-application, android-development, android-sdk
Androidkex
Extensions for Kotlin. Use the power of Kotlin to make your code smaller and beautiful.
Stars: ✭ 35 (-28.57%)
Mutual labels:  android-app, android-architecture, android-application, android-development, android-sdk
media-picker
Easy customizable picker for all your needs in Android application
Stars: ✭ 167 (+240.82%)
Mutual labels:  android-sdk, android-development, android-application, android-architecture, android-app
permissions-flow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 81 (+65.31%)
Mutual labels:  android-sdk, permissions, android-development, android-architecture, kotlin-coroutines
Android Arsenal.com
Source to android-arsenal.herokuapp.com
Stars: ✭ 541 (+1004.08%)
Mutual labels:  android-app, android-architecture, android-application, android-development, android-sdk
android-jetpack
🚀 Road to Accelerate Android Development using Jetpack
Stars: ✭ 50 (+2.04%)
Mutual labels:  android-sdk, android-development, android-architecture, android-app
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-46.94%)
Mutual labels:  android-sdk, android-application, android-architecture, android-app
Expenso
📊 A Minimal Expense Tracker App built to demonstrate the use of modern android architecture component with MVVM Architecture
Stars: ✭ 325 (+563.27%)
Mutual labels:  android-app, kotlin-coroutines, android-architecture, android-development
Livesmashbar
An elegant looking and easy to use informative library with LiveData integration for Android.
Stars: ✭ 107 (+118.37%)
Mutual labels:  android-app, android-application, android-development, android-sdk
Canaree Music Player
Complete music player published in the Play Store. Heavily relies on Dagger, kotlin coroutines and Clean architecture.
Stars: ✭ 371 (+657.14%)
Mutual labels:  android-app, android-architecture, android-application, android-development
Notzz App
📝 A Simple Note-Taking App built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, State Flow, Hilt-Dependency Injection, Jetpack DataStore, Architecture Components, MVVM, Room, Material Design Components).
Stars: ✭ 158 (+222.45%)
Mutual labels:  android-app, kotlin-coroutines, android-architecture, android-development
Awesome Android Ui
😎 A curated list of awesome Android UI/UX libraries
Stars: ✭ 353 (+620.41%)
Mutual labels:  android-app, library, android-development, android-sdk
Droid Feed
Aggregated Android news, articles, podcasts and conferences about Android Development
Stars: ✭ 174 (+255.1%)
Mutual labels:  kotlin-coroutines, android-architecture, android-application, android-development
Kotlin Android Scaffolding
An android project structure using kotlin and most common libraries.
Stars: ✭ 53 (+8.16%)
Mutual labels:  android-app, android-application, android-development, android-sdk
Android-MonetizeApp
A sample which uses Google's Play Billing Library and it makes In-app Purchases and Subscriptions.
Stars: ✭ 149 (+204.08%)
Mutual labels:  android-sdk, android-development, android-architecture, android-app

Permissions Flow

Download API

A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.

Setup

Gradle:

Add following line of code to your module (app) level gradle file:

    implementation 'com.innfinity:PermissionsFlow:<LATEST-VERSION>'

Maven:

  <dependency>
    <groupId>com.innfinity</groupId>
    <artifactId>PermissionsFlow</artifactId>
    <version>LATEST-VERSION</version>
    <type>pom</type>
  </dependency>

Usage:

Permission flow offers 2 simple extension functions - both for for activities/fragments:

requestPermissions(vararg permissionsToRequest: String)
requestEachPermissions(vararg permissionsToRequest: String)

Both functions do request all permissions passed to them - the first one emits a list of Permissions, the second one flattens the permissions.

Here's a full code example like it would look like in an activity:

override fun onCreate(savedInstanceState: Bundle?) {
 
    CoroutineScope(Dispatchers.Main).launch {
        // just call requestPermission and pass in all required permissions
        requestPermissions(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
            .collect { permissions ->
                // here you get the result of the requests, permissions holds a list of Permission requests and you can check if all of them have been granted:
                val allGranted = permissions.find { !it.isGranted } == null
                // or iterate over the permissions and check them one by one
                permissions.forEach { 
                	val granted = it.isGranted
                	// ...
                }
            }
	}
}

That's it!

With only few simple steps you can request permissions without splitting your code or overriding functions.

Versions

1.1.0

Extensions for Fragment and Activity added

1.0.0

First version of library

Contact

Licence

    Permissions Flow©
    Copyright 2020 Robert Levonyan
    Url: https://github.com/innfinity-am/PermissionsFlow

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