{"repo":"PatilShreyas/permission-flow-android","free":true,"listed":false,"github":"https://github.com/PatilShreyas/permission-flow-android","clone":"git clone https://github.com/PatilShreyas/permission-flow-android.git","description":"Know about real-time state of a Android app Permissions with Kotlin Flow APIs.","language":"Kotlin","stars":607,"topics":["android","android-library","coroutines-android","kotlin","kotlin-android","permission-android","stateflow","stateflow-android","android-app","compose"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"Permission Flow for Android Know about real-time state of a Android app Permissions with Kotlin Flow APIs. Made with ❤️ for Android Developers . 💡Introduction In big projects, app is generally divided in several modules and in such cases, if any individual module is just a data module ( not having UI ) and need to know state of a permission, it's not that easy. This library provides a way to know state of a permission throughout the app and from any layer of the application safely. For example, you can listen for state of contacts permission in class where you'll instantly show list of contacts when permission is granted. It's a simple and easy to use library. Just Plug and Play. 🚀 Implementation You can check /app directory which includes example application for demonstration. 1. Gradle setup In build.gradle of app module, include this dependency You can find latest version and changelogs in the releases . 2. Observing a Permission State 2.1 Observing Permission with StateFlow A permission state can be subscribed by retrieving StateFlow or StateFlow as follows: 2.2 Observing permissions in Jetpack Compose State of a permission and state of multiple permissions can also be observed in Jetpack Compose application as follows: 3. Requesting permission with PermissionFlow It's necessary to use utilities provided by this library to request permissions so that whenever permission state changes, this library takes care of notifying respective flows. 3.1 Request permission from Act","default_branch":null,"files":null,"tree":[],"storefront":"/r/PatilShreyas","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PatilShreyas/permission-flow-android/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}