THIS Is How You Use Notifications on Android API 33+ (Notification Permission)

  Рет қаралды 40,955

Philipp Lackner

Philipp Lackner

Күн бұрын

To be able to show notifications on API level 33+, users now need to accept a permission before. In this video I'll show you how to do that in your app.
⭐ 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 be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/...
Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/...
Join this channel to get access to perks:
/ @philipplackner
Get the source code for this video here:
github.com/phi...
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...

Пікірлер: 67
@alswp0404
@alswp0404 2 жыл бұрын
Phillip. You are my current Android god sent from Andrid soul. I'm watching couple of your playlists and I can't thank you enough. Small request - I have very sensitive hearing ability and I can hear there is a small white noise in the background and you can get rid of it completely if you get the noise cancelling mic while recording. It's not about the mic it can be done in software layer I believe. Keep on going! You should have way more sub sooner or later cuz you're currently best Android youtube out there.
@ManuelSilverioCoder
@ManuelSilverioCoder 5 ай бұрын
I don't know how you always managed to make the best videos, but you always do. Again no one else explain this clearly and then you have an amazing video. You definitely have a gift for teaching and explaining. You are becoming a foundational pillar in the Android community, Google should add you on their payroll
@PhilippLackner
@PhilippLackner 5 ай бұрын
Thank you so much!!
@markmurtagh4777
@markmurtagh4777 9 ай бұрын
Google documentation around this is so unnecessarily large, incomplete and confusing. Great video, perfectly explained.
@zevdvlpr
@zevdvlpr Жыл бұрын
I was having trouble finding a solution for API 33, and now I've got it! Thanks for the tutorial.
@raghu1077
@raghu1077 2 жыл бұрын
Much awaited video
@jovan_spasovic
@jovan_spasovic 6 ай бұрын
Absolute king. Thank you for amazing content.
@FranciscoConstante
@FranciscoConstante Жыл бұрын
Thanks for this good tutorial! Greetings! Happy new year!
@AndreuJapan
@AndreuJapan 2 жыл бұрын
There is a possible bug or maybe intentionally from Google but, the first time you install the app, shouldShowRequestPermissionRationale() is false. Until the user touch "Don't Allow" the value doesn't change to true. That means, if you want to show a rationale screen from the begining is not possible is some flag is not added.
@ZoherJetpurwala94
@ZoherJetpurwala94 2 жыл бұрын
Yeah. It's kind of annoying to me.
@muhammadsaqib453
@muhammadsaqib453 2 жыл бұрын
Instead of formatting code manually you can use ctrl+shift+L. It is an advise.
@rubansinghjohn8055
@rubansinghjohn8055 2 жыл бұрын
Wel done keep going good work
@afixithei.V
@afixithei.V 2 жыл бұрын
For a few seconds I wasn't sure what was going on. Then I realised it was compose 😅 my spare time now is used to learn Flutter because it has more job opportunities in my country - Nigeria. I still work as a full-time android developer though but I've never used compose
@nastenkaoo
@nastenkaoo Жыл бұрын
ok
@georgenady7375
@georgenady7375 2 жыл бұрын
and it's a cool motion graphics 😎 👌
@aliciabeltran
@aliciabeltran Жыл бұрын
I love all your videos, please continue creating more content. A little question, how can I see notification if the app is not in FOREGROUND. I am using GCM but if the app is close I cant see the notification in API 33+, and the push is not visible for any API, but API < 33 show the push. I am creating the push when I am receiving the message from firebase.
@daniyar2718
@daniyar2718 2 жыл бұрын
What if you click 2-3 times not allow, then I guess dialog will stop appearing, then you should send user to app permission settings? It would be nice, if you would mention and show it 😉 Ps. Thanks for video.
@vinaykumarkharwar177
@vinaykumarkharwar177 Жыл бұрын
He has already explained that in his last permission handling video. Why not go watch and apply it yourself?
@LeCezar
@LeCezar Жыл бұрын
Hey phillip, I always wonder with your videos, what is the color scheme of the code you are using? It looks really cool!
@PhilippLackner
@PhilippLackner Жыл бұрын
Xcode dark :)
@mkom5837
@mkom5837 2 жыл бұрын
Great video, do you have in plans any tutorial about RemoteMediator?
@georgenady7375
@georgenady7375 2 жыл бұрын
Thanks for cleaning up that new updates 💪
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Welcome!
@makkhan3153
@makkhan3153 2 жыл бұрын
Thanks to Android, it's never get boring. We all can relate that.
@samsammaniamantap
@samsammaniamantap 2 жыл бұрын
It will be a Card of Jira on the next Sprint, perhaps😂
@ManmohanSingh-ew3mv
@ManmohanSingh-ew3mv 2 жыл бұрын
Lmao, yes..indeed it is. 😂😂
@SujeetKumar-ci9sg
@SujeetKumar-ci9sg 2 жыл бұрын
😂😂
@yasserakbbach7342
@yasserakbbach7342 2 жыл бұрын
On our side it was already implemented, reviewed and merged 😉
@Leon-un2ii
@Leon-un2ii 2 жыл бұрын
Please make a video on how you can send a notification to a user from an linux server. It would be awesome. Thank you. As always: great content.
@skarloti
@skarloti 2 жыл бұрын
Thank you! Maybe there should have been a third button that hides the displayed notification. This is appropriate when after a time not in valid and must be hidden.
@shashankbhat6184
@shashankbhat6184 2 жыл бұрын
Hi Phillip, We need more videos on KMM. Please include network calls. Thanks 🙏
@user-rz1hv
@user-rz1hv 2 жыл бұрын
There is such a nice composable as SwipeToDismiss, would be very interesting if you will make a video about it!
@moumnalmunawy1806
@moumnalmunawy1806 2 жыл бұрын
Should we use service or intent service or work manager?
@sumitbehera5311
@sumitbehera5311 6 ай бұрын
Sir can we have a full playlist on ktor
@jayshartzer844
@jayshartzer844 2 жыл бұрын
So if we need permissions for notifications now and background services need a visible notification to keep running since Android 8 does this mean we need the notification permission in order to keep background services? I didn't see it in the docs. Was this part of the Google I/O?
@frukoyurdakul
@frukoyurdakul 2 жыл бұрын
Check out FGS (Foreground Service Manager) for that. While you may not post your notification in the sense of posting it, the manager will allow you to start your foreground service. The important part is that you need to create your notification channel at application class before user explicitly (possibly) denies your permission, twice. Otherwise you may get a different exception when you try to launch that service.
@wiiznokes2237
@wiiznokes2237 2 жыл бұрын
Hello, could you make a video about how to use Service witch influence View Model state? I think it is a commun topic and Android does not give much detail.
@H0neyHunter
@H0neyHunter Жыл бұрын
I wonder if the reason why the notification is silent is due to the emulator? Is there a way to activate the sound?
@AlanT0ng
@AlanT0ng Жыл бұрын
If I put every permission launcher in my UI compose code, I will have all my permission request codes (say notification, location, camera) all over the place in my UI compose code. Is there a better way to centralize all my permission request handling but still allow me to request permissions whenever I need them on different UI screens?
@PhilippLackner
@PhilippLackner Жыл бұрын
Put them in their own function 🤷😁
@SkillTrailMalefiahs
@SkillTrailMalefiahs Жыл бұрын
Great video bro, please, share you Android Editor theme is cool!!!
@CoderzF1
@CoderzF1 2 жыл бұрын
thats a bit different than what i did, but i like your version better 🤣
@atarok8964
@atarok8964 Жыл бұрын
Hello Phillip Api 33 service mediaplayer notification buttons ( play pause next...) addAction(...) butoms are not Clicking only in media style- can you help? - note : It works in smaller than Api33 version.
@user-rz1hv
@user-rz1hv 2 жыл бұрын
But what if I have an app that targets this api and I will run it only on lower android version? Do i need to implement notifications this way or I can use older approaches?
@lanzylanzgerlan8931
@lanzylanzgerlan8931 2 жыл бұрын
This is great
@NikolaiNedialkov
@NikolaiNedialkov 6 ай бұрын
This all works great, but when I tried to add .setContentIntent(pendingIntent) the notifications stopped appearing. Does anyone know what could be causing this?
@bijeshjayaprakash7894
@bijeshjayaprakash7894 2 жыл бұрын
Wht theme are you using for Android Studio...
@GB-nn2cx
@GB-nn2cx 2 жыл бұрын
Thanks
@johngray2875
@johngray2875 Жыл бұрын
They made it a mess. I'm playing audio. I need a notification to play in the background. Now I need to request permission to show the notification. Now I have users who denied the permission, and are giving me bad reviews because it doesn't play the background. Add on top of that all are the issues with overly aggressive battery management by some manufacturers that are suspending my app after a few minutes of playing in the background unless the user adjusts the battery settings. Playing audio in the background on Android has become absolutely fraught with peril.
@mustafaammar551
@mustafaammar551 2 жыл бұрын
Thank you Bro
@vahekhachaturian2424
@vahekhachaturian2424 2 жыл бұрын
this is pain in the ass, but it's genuinely better for the user. It also covers up the case when you register user's device in a cloud service, which sends notifications, and everything gets messed up when user chooses to clear data of the app
@KotlinBek
@KotlinBek 2 жыл бұрын
Thanks, can we dive deeper in next video?
@PhilippLackner
@PhilippLackner 2 жыл бұрын
What's missing?
@love_khush
@love_khush 2 жыл бұрын
Awesome video great tutorial
@kevinanderson2783
@kevinanderson2783 Жыл бұрын
Hi guys.I have a question in android 13: I have a call notification. There are 2 button for 'answer' and 'reject'. When click on "answer" needs to start callActivity class. but startActivity method is not working when app is killed in android 13. In android lower than 13 there is no problem and all works properly. Could anyone help me?
@hiEroneta
@hiEroneta 2 жыл бұрын
💙
@josema2702
@josema2702 Жыл бұрын
so you always have to request te user to show notifications? sorry I am not english native speaker
@patrik956
@patrik956 2 жыл бұрын
you are best i love you
@dummyaccount-j1t
@dummyaccount-j1t Жыл бұрын
is there a version of this in java?
@androidmaster9869
@androidmaster9869 2 жыл бұрын
Android team always try to make it hard for the developer . That's one of the reasons most of the apps and and ROM has lots of bugs and problem.
@tailwind6813
@tailwind6813 2 жыл бұрын
Absolut schrecklich das Google sowas nicht vereinheitlichen kann. Mit Swift ist es so einfach und man benötigt unheimlich wenig Code. Hier ist alles aufwendig ohne Ende. Und das war ja lediglich die Lösung für API Level 33. Jetzt kommen noch die restlichen hinzu. Gerade bei der echten Fragmentierung am Handy Markt, absolut schrecklich. Ich habe noch immer viele Nutzer mit Android 7, 8 oder 9. Wenn wir jetzt überlegen das 13 im Anmarsch ist, ist das nur traurig.
@jithind-feverx2818
@jithind-feverx2818 3 ай бұрын
Thanks to Android 😂😂
@humble_roots
@humble_roots Жыл бұрын
Please tell me you have this in Java lol
@شرحتطبيقالاعلافالبديلة
@شرحتطبيقالاعلافالبديلة 6 ай бұрын
yeah same problem here the syntax for kotli diffrent ... and he do tut on kotlin only ... maybe i will try to convert code to java .. it same instructions any way
@sijanneupane
@sijanneupane 2 жыл бұрын
saving it for later!
@Jasmohan
@Jasmohan 4 ай бұрын
Damn, that is annoying to do for such a simple task. Thanks @PhilippLackner
@nihal999in
@nihal999in 2 жыл бұрын
Nothing is new except that permission declaration at Manifest ...
Should You Use Compose State or StateFlow in Your ViewModels?
13:59
Philipp Lackner
Рет қаралды 79 М.
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 123 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 6 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 56 МЛН
Cool Parenting Gadget Against Mosquitos! 🦟👶
00:21
TheSoul Music Family
Рет қаралды 6 МЛН
THIS Is How You Schedule Alarms on Android with AlarmManager
21:55
Philipp Lackner
Рет қаралды 40 М.
How to Navigate in Jetpack Compose 🚀 | Android Studio | 2024
13:45
Foreground Services - Android Basics 2023
22:22
Philipp Lackner
Рет қаралды 81 М.