Local Notifications in Android - The Full Guide (Android Studio Tutorial)

preview_player
Показать описание
With notifications, you can show an information to the user when your app is not active and encourage them to do some action like opening your app. In this video you'll learn how you can show such notifications in Android.

⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:

Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!

Join this channel to get access to perks:

Get the source code for this video here:

Join my Discord server:

You like my free content? Here you can buy me a coffee:
Рекомендации по теме
Комментарии
Автор

Good video for a tutorial! I would like to mention something that I've experienced about 2 weeks ago while dealing with foreground services, which also requires notifications so I thought this would be a nice place to mention.

As of 2022-08-03, starting from API 33 (Android 13 Tiramisu), you will need to ask a runtime permission for notifications which the user will be able to deny. If that happens, you won't be able to post notifications. That includes creating notification channels as well. I had a habit of creating the channel right before posting the necessary notification before. But on API 33, the system prevents the app from creating a valid channel that you could post your notifications on if user denies the permission. That effectively prevents you from posting notifications for foreground services as well (the documentation states it will permit calling startForeground with a valid notification but actually doesn't if the permission was denied and channel was not created beforehand.)

But, before asking the permission, you can create a notification channel, then the system will not post it when startForeground is called but it will not crash even if the user denies the permission afterwards. So, create your notification channels in application class, devs!

Just wanted to mention it here.

frukoyurdakul
Автор

Very helpful. I love this channel because I think this is one of the channels which are has up-to-date information. Most of the other Android channel videos are very old. Appreciate the level of free content which is provided. Thank you.

Sam-ybut
Автор

Please upload push notification video also and how to manage push notification when app is open

ishantsharma
Автор

Thanks for mentioning in advance that, its all about locah notifications and not about push notifications. You also explaing difference between push and local notification. good work bro.

tanveerhaiderjafri
Автор

This is the perfect video I was looking for. Thanks very much.

lyawileh.a
Автор

Thank you! Really nice and understandble tutorial!

bortolex
Автор

wow! you actually solve my problem! i kinda regret not watching this earlier when found a bug in notification :(

wahyukoco
Автор

Philipp Lackner I have been watching every single tutorial video you published. Furthermore, I really like your videos and I would love to see more. Moreover, I hope that you will do a video on foreground service soon. Thank you for your hard work.👍

KingFuYouTube
Автор

Please explain to us about sending at a specific time by jobscheduler

ahmedassas
Автор

Thank you brother. This video is very helpful. Love from India. ❤

Dibyendu.M
Автор

Very Informative thanks for notifications guide

jarvis
Автор

Nice video! I refer to your videos often. Thanks. Can i ask how to create android project templates like initial source code you given? Have a nice day 😊😊

dkakqlql
Автор

Can we put createNotificationChannel method in dependency injection instead of the "MyApp" class?

mohamadalighezelbashyan
Автор

Hi Philips, I wonder if we can pin a notification on top without make it heads up (setting priority high)

khangchow
Автор

about runtime permssion app for notification appear in Android 13.
even if is local notificacions need that righT?

rogercolque
Автор

Hello, thanks for this video ! How can we make the notifications display as heads-up ?

aurere
Автор

Hello Philipp L. many thanks for another informative and well explained video. Could you explain how to load a static json file from assets folder to a data class in viewmodel context? Using Moshi or other solution. Soon joining the community, thanks, best regards

tmjromao
Автор

Thank you so much .assume we are loading data from the bacend server, how can we keep the user notofied even when the app js closed .thank you Philip .🙏

kirwakelvinkering
Автор

Thank you! How about video for WearOs app with Compose? How to connect an app with watches?

denisk
Автор

Hi! I would like to know if there is a way to improve the use of Android navigation app which would notify users by screen flashing, vibrating or maybe sending warning to an external device which would sit in user's pocket when user is approaching to waypoints specified inside a ?.gpx file. Here's why: when riding a motorcycle during sunny days the mobile screen reflects the sunshine and it is hard to see a waypoints on display and riders can't hear the phone's sounds. I guess screen flashing would be the best way to warn/notify riders.
So far I liked OsmAnd app for navigation. If it could display warnings as I described it would be great because available voice prompts are kind of useless.

Jurica-mtb
join shbcf.ru