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

Комментарии • 52

  • @PhilippLackner
    @PhilippLackner  2 года назад +14

    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 :)

    • @NeerajKumar-du4rm
      @NeerajKumar-du4rm 2 года назад

      they added perm.status

    • @meghashreeacharya5057
      @meghashreeacharya5057 Год назад

      Can you create a video on non-compose implementation using same logic

    • @mo_mo_meaw
      @mo_mo_meaw Год назад

      @@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

    • @zeeshanahmed5242
      @zeeshanahmed5242 6 месяцев назад

      Yes it change alot. Please make a video on it.

  • @shaikhshafeen
    @shaikhshafeen 3 года назад +14

    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!

  • @aestheticdesigns7469
    @aestheticdesigns7469 3 года назад +9

    Bro you are doing tutorials for all important topics. Thanks keep doing:)

  • @tikayz
    @tikayz 2 года назад

    Nobody explains concepts better than you do. keep up the good work. Thanks so much for all these free tutorials

  • @kisanshah3739
    @kisanshah3739 3 года назад +6

    Nice video 🔥🔥🔥
    Please cover Local storage with MVVM.

  • @deepakdas6423
    @deepakdas6423 3 года назад

    Lots of love from India...
    Your videos are very helpful...

  • @ubersticks
    @ubersticks 3 года назад

    Thanks Phillip - short and sweet, excellent.

  • @vengateshm2122
    @vengateshm2122 3 года назад +3

    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.

    • @harisai3580
      @harisai3580 2 года назад +1

      Thankyou sir, I have been thinking about this. You have clarified.

  • @pranavsubramanian2549
    @pranavsubramanian2549 2 года назад +3

    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.

  • @DaleHawkins
    @DaleHawkins 3 года назад

    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. :-) )

  • @davidgaskillUK
    @davidgaskillUK 3 года назад

    Thank you very much!
    Another great tutorial!

  • @codinginflow
    @codinginflow 3 года назад +4

    first

  • @sebastianseno9285
    @sebastianseno9285 2 года назад

    Philipp you should enable your "Thanks" button on RUclips. I want to treat you a coffee sometimes 😁.

  • @kanutso2425
    @kanutso2425 2 года назад +1

    thanks for helping : )

  • @mykhailomykytyn
    @mykhailomykytyn 2 года назад

    straight to prod

  • @commentsonthetube14
    @commentsonthetube14 4 месяца назад

    Would love to see a standard flow for requesting BG location. It's a bit of a quagmire.

  • @dendroid4389
    @dendroid4389 2 года назад

    danke!❤❤

  • @kunduztalaybekovna8406
    @kunduztalaybekovna8406 3 года назад

    Thank you very much! )

  • @velitasali
    @velitasali 3 года назад +1

    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)?

  • @akashkumardas6521
    @akashkumardas6521 3 года назад

    Thank you so much sir

  • @mustafaammar551
    @mustafaammar551 3 года назад

    very cool thank you

  • @immanueljzv6832
    @immanueljzv6832 2 года назад

    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 ?

  • @friendsandfamily2312
    @friendsandfamily2312 3 года назад +1

    please make more tutorials on android canvas

  • @anthonycraddock4782
    @anthonycraddock4782 3 года назад

    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?

    • @PhilippLackner
      @PhilippLackner  3 года назад +2

      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

    • @anthonycraddock4782
      @anthonycraddock4782 3 года назад

      @@PhilippLackner

  • @FCXPERT10
    @FCXPERT10 3 года назад

    Please upload videos about mvvm in jetpack compose

  • @jemspatel5359
    @jemspatel5359 3 года назад

    Please make video about local storage with MVVM 😁😁

  • @brainman2125
    @brainman2125 3 года назад

    Thanks for video! But now this tutorial is outdated , with the last version of this library has changed some things

  • @alexaguiar7268
    @alexaguiar7268 3 года назад

    @ExperimentalPermissionsApi gives now an error in kotlin compiler 1.6. I see no further solution

    • @mv2e19
      @mv2e19 3 года назад

      Try moving the annotation to the top of the MainActivity class rather than above setContent{}

  • @alfietapping4034
    @alfietapping4034 2 года назад

    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?

    • @PhilippLackner
      @PhilippLackner  2 года назад +1

      of course this is very individual depending on the permission you're requesting. This is not a storage, camera or whatever tutorial

  • @SudhanshuKumar-xy6xv
    @SudhanshuKumar-xy6xv 3 года назад

    🔥🔥

  • @amineayachi335
    @amineayachi335 3 года назад

    the best 5 starts/5

  • @bren7473
    @bren7473 2 года назад +1

    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?

  • @ericgacoki2225
    @ericgacoki2225 3 года назад +2

    Why is no one talking about the thumbnail? 😂

  • @mahetachirag8395
    @mahetachirag8395 3 года назад

    What about flutter??

  • @ashokkar5790
    @ashokkar5790 2 года назад +1

    completely secouried

  • @bokangthoola9095
    @bokangthoola9095 3 года назад +1

    First to comment!

  • @haissayf
    @haissayf 3 года назад

    Nice tutorial but the thumbnail 🤣🤣🤣🤣🤣

  • @nickvillareallycool5228
    @nickvillareallycool5228 2 года назад

    Why is DisposableEffect needed instead of just SideEffect?