How to Do PROPER Permission Handling in Jetpack Compose - Android Studio Tutorial
HTML-код
- Опубликовано: 9 фев 2025
- In this video you will learn how you can properly request runtime permissions in a Jetpack compose project.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/...
💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
elopage.com/s/...
🎓 Become an industry-ready developer in the Mobile Dev Campus:
pl-coding.com/...
🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":
pl-coding.com/...
Read our weekly Android blog:
pl-coding.com/...
Join this channel to get access to perks:
/ @philipplackner
Get the source code for this video here:
github.com/phi...
Regular live codings on Twitch:
/ philipplackner
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: github.com/phi...
You like my free content? Here you can buy me a coffee:
www.buymeacoff...
Seems like things have changed and not everything is working anymore as it used to. Will soon make another updated video about permissions in compose :)
they added perm.status
Can you create a video on non-compose implementation using same logic
@@NeerajKumar-du4rm bro I m using it in a floating button but it's not working as expected please suggest me
Dialog is not showing
Yes it change alot. Please make a video on it.
I can't thank you enough for all these work that you have done. I am really happy to stumble upon your channel.
Nobody bothers to make good videos on android development in Kotlin.
Also PLEASE don't care about the views and likes maybe like me if others dig a bit deep they will surely find the gem!
Once again thanks a lot and keep up the good work!
Bro you are doing tutorials for all important topics. Thanks keep doing:)
Nobody explains concepts better than you do. keep up the good work. Thanks so much for all these free tutorials
Nice video 🔥🔥🔥
Please cover Local storage with MVVM.
Lots of love from India...
Your videos are very helpful...
Thanks Phillip - short and sweet, excellent.
Very welcome
Thank You.
Since permissionState is inside composable we have used DisposableEffect.
Otherwise we can request in onResume or separate class of Lifecycle observer registered in activity.
Please create a video on creating custom rememberState()
For instance
rememberBatteryLevelState()
rememberNetworkConnectionState()
so that we can observe and change the ui.
This will be helpful in real projects.
Thankyou sir, I have been thinking about this. You have clarified.
Philipp, I am a 12-year-old student working on a project. Your videos are really good for beginners. If not for your channel I would not be able to do my project.
My Suggestions:
Please make content on:
Advanced UI with Jetpack Compose
Google Accompanist for Jetpack
Jetpack navigation Advanced
Chat Application
Recording and Playing Audio/Video
Jetpack Compose Multiplatform
Building Jetpack Libraries
Speech-to-Text and Text-To-Speech
And many more AI projects
Thank you so much for the work you're doing.
Well, that's what I get for coding along and listening to the audio as a queue to focus back on the video. (Hit the ON_RESUME vs ON_START issue. :-) )
Thank you very much!
Another great tutorial!
first
The Florian Raider is back!
Philipp you should enable your "Thanks" button on RUclips. I want to treat you a coffee sometimes 😁.
thanks for helping : )
straight to prod
Would love to see a standard flow for requesting BG location. It's a bit of a quagmire.
danke!❤❤
Thank you very much! )
Nice video. Btw Android kills the app if the user revokes permission while the app is running. Also, instead of DisposableEffect, wouldn't launchWhenResumed also work in this scenario (although I haven't used it before)?
Thank you so much sir
very cool thank you
Hey philip thank you for the great tutorial, I was wondering whether we could call the permissions inside a plain kotlin file or should it be defined in class of activity or fragment ?
please make more tutorials on android canvas
Another excellent tutorial, thanks Philipp!! I love learning about the latest libraries and API's that are available. Can I ask a true or false question? Using these experimental features in practice code is fine and one day they will probably become non-experimental but if you were to publish an app on the Play store your code should not contain any experimental API's or dependency library's in beta or alpha versions?
Tbh, I personally don't pay much attention to that. When I take a look at coroutines, there are things marked as experimental for ages (like runBlockingTest). In regards to compose im more careful and not using that in general for production yet. Not because it's unstable, but because it can lead to a lot of unexpected issues and things that can't easily be done yet
@@PhilippLackner
Please upload videos about mvvm in jetpack compose
Please make video about local storage with MVVM 😁😁
Thanks for video! But now this tutorial is outdated , with the last version of this library has changed some things
@ExperimentalPermissionsApi gives now an error in kotlin compiler 1.6. I see no further solution
Try moving the annotation to the top of the MainActivity class rather than above setContent{}
Something this doesn't cover is when giving a permission, how can a developer handle that? A real life scenario would be to give access to the the phone's media after both camera & read external storage permission is given, so what should you do inside perm.hasPermission {} to then check read external storage is also given?
of course this is very individual depending on the permission you're requesting. This is not a storage, camera or whatever tutorial
🔥🔥
the best 5 starts/5
Androids logic behind permissions is so bizarrely confusing to implement. Now accompanist permissions has been updated and it no longer works properly for me.
Why in the hell is google making permissions so confusing to implement?
Why is no one talking about the thumbnail? 😂
What about flutter??
completely secouried
First to comment!
second
Fourth!
People from StackOverflow: these are all stupid comments. 😂
Nice tutorial but the thumbnail 🤣🤣🤣🤣🤣
Why is DisposableEffect needed instead of just SideEffect?