Handling Multiple Permission using Jetpack Compose

Hi Friends todays we look in to how to handle multiple permission using Jetpack compose so in this example we use CAMERA and RECORD_AUDIO Permission

First we have to add google accompanist implementation in our app build gradle which make the permission process easy

Then we have too declare the listof() permission if you are going to use single permission then you can use rememberPermissionState()

After that by using permission state we get permission in string format by using that we can compare camera or Record Audio inside we have several when statement like got permission display granted if its denied for the first time we show the use of the permission and if they deny again then we display message mentioning that it has to be enabled on app settings

And i am launching that permission inside on start lifecyle

Final code

Knowledge is everything.Check out my app at https://play.google.com/store/apps/details?id=com.vibe.britevibe

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Google Adapts Android to Chromebooks

Using Kotlin on Server side

Get started with the Navigation component — Beginner In-Depth Guide

The Twelfth week with OpenMRS

Clean Recycler view with MVVM + LiveData + Repository+ DataBinding pattern

[Solved]Android studio —  The emulator process for AVD was killed process on Mac

Upload an Image or File To Your Server Using Volley in Kotlin

Installing Android Studio and Emulator on Google Cloud Ubuntu 20.04.1 LTS (Focal Fossa).

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pandiyan Mani

Pandiyan Mani

Knowledge is everything.Check out my app at https://play.google.com/store/apps/details?id=com.vibe.britevibe

More from Medium

From Gradle to Gradle.kts: The definitive Groovy to Kotlin conversion guide.

Jetpack Compose: Detect the current number of touches on the screen

Introduction to Jetpack Compose

Zip, combineLatest, debounce etc in Coroutines?