THIS Is How You Schedule Alarms on Android with AlarmManager

  Рет қаралды 37,783

Philipp Lackner

Philipp Lackner

Жыл бұрын

In this video I'll show you how you can schedule alarms in Android using AlarmManager.
⭐ 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/premium-courses...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/drop-table-ment...
Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/newsletter
Join this channel to get access to perks:
/ @philipplackner
Get the source code for this video here:
github.com/philipplackner/Ala...
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: github.com/philipplackner
You like my free content? Here you can buy me a coffee:
www.buymeacoffee.com/philippl...

Пікірлер: 95
@sreeranjas6585
@sreeranjas6585 Жыл бұрын
Man you are a legend the best teacher i was searching for this topic
@FemiOkedey
@FemiOkedey Жыл бұрын
This is a sore topic for me I just recently spent hours debugging. Thank you for this, it helps a lot
@Leon-un2ii
@Leon-un2ii Жыл бұрын
Thank you sooo much for making a video about this topic, which I wished before!
@zelotbe
@zelotbe Жыл бұрын
Thank you man! I just needed this for my project. I'm definitely gonna check out your premium courses.
@denisgithuku8563
@denisgithuku8563 Жыл бұрын
Eventually someone came out and gave us the real pill we needed
@GN9K71
@GN9K71 Жыл бұрын
Please make more detailed video about managing alarms in dozen mode, or when the device is in low power mode(in different bucket). How we should handle that.
@ka61er
@ka61er Жыл бұрын
Work manager + auto start in poco device worked for me which is china's device
@venkateshlingampally7220
@venkateshlingampally7220 Жыл бұрын
Thankyou so much for this video 🔥🔥 you are just osm man 🤯
@kenali4612
@kenali4612 Жыл бұрын
Thanks philipp!
@sercan272727
@sercan272727 11 ай бұрын
I need alarm receiver to keep listening for events in background after alarm is scheduled , and even if app is closed , screen is turned off, I want to wake up device to display something on screen when the alarm time comes . how to achieve this ? for some reason I cant start an activity after i quit the app
@tochukwuokey-munonye7884
@tochukwuokey-munonye7884 Жыл бұрын
Please since alarm manager is in data layer. How do we pass context to the alarm manager if we are not supposed to pass through viewmodel
@So7696
@So7696 Жыл бұрын
Thank you Philip
@mohamedsanoob.k1116
@mohamedsanoob.k1116 Жыл бұрын
Most wanted tutorial ❤️❤️❤️👍
@KumarSiddhant-j9w
@KumarSiddhant-j9w Ай бұрын
Hey Philipp thank for this video it is really helping me but i am trying to code a module where i want to trigger a alarm when android device is in lock state where i want to show a screen or custom image and custom sound.
@mayurpatil5168
@mayurpatil5168 Жыл бұрын
Hi Philipp, please make some videos about AOSP integration and its use in Android Studio projects. Thank you..
@arunrajkumard5238
@arunrajkumard5238 Жыл бұрын
You always rocking...
@mikelantzelo
@mikelantzelo Жыл бұрын
Thank you!
@hemantjain9912
@hemantjain9912 Жыл бұрын
Hey, Can you please make one video on custom theming in jetpack Compose. How to implement and full guide. Thanks in advance
@trocchiettoski
@trocchiettoski Жыл бұрын
a new suggestion. Often as daily life we have to parse map a long data transfer object from json and adapt to the UI model, well we need to use a lot of transformations as flatmap, map, to flatten, combine flows, what to parse in json and what not etc, some use cases short video would be useful, some strategies, guidelines for messing API, that is a challenge we daily face
@baharudinmaulana78
@baharudinmaulana78 Жыл бұрын
Good video Philip. Actually now seek good tutorial about it and finally you make video about alarm guide, I will open for feedback, i waited 😃😃
@egagabut5235
@egagabut5235 Жыл бұрын
Good channel bro 👍
@bolokurowo5867
@bolokurowo5867 Жыл бұрын
You too good
@gelsonschikorski8158
@gelsonschikorski8158 Жыл бұрын
Awesome!
@proandroiddevir
@proandroiddevir Жыл бұрын
Thank you Philip🙏🙏🙏🙏👏👏👏👏👏👏👏👏👏👏👏
@gouravrawatscience
@gouravrawatscience Жыл бұрын
But sir in Chinese manufacturers phones like Xiome, realme, redmi etc. Kill alarms. They also kill work manager and job scheduler. Anybody answer will be appreciated😊😊.
@ka61er
@ka61er Жыл бұрын
my poco x3 pro, redmi note 7 never kill work manager or job scheduler like you say
@sufiyanshaikh3754
@sufiyanshaikh3754 5 ай бұрын
@@ka61er we need to enable autostart on the above phones. Otherwise, it kills workmanager and job scheduler.
@user-uz8qe7pf6t
@user-uz8qe7pf6t 7 ай бұрын
Sir really need your help in one thing how can we set an alarm on a day which is after a week or after 10 days. What are the additional things i should add to the code please help
@Akshaykumar-xr9yj
@Akshaykumar-xr9yj 11 ай бұрын
Hi phillip, I have a question. How can i fit Alarm manager in clean architechture. Where should i put broadcast receiver and AndroidAlarmSchedular class. i can't put broadcast receiver in data layout. becuase I have to perform bussness logic in broadcast receiver. domain layout is also not an option. If i put it in presenter layer then i have to put AndroidAlarmSchedular as well in the presenter layer. But i think AndroidAlarmSchedular should be in data layer (from the context of video). I didn't found this perticular use case in any of your youtube video or paid course except last one that i don't have.
@TeinOcnalb
@TeinOcnalb 9 ай бұрын
data/repository - AndroidAlarmSchedulerImpl domain/model - AlarmItem domain/repository - AndroidAlarmScheduler presentation - BroadcastReceiver
@nicolasnguyen1611
@nicolasnguyen1611 5 ай бұрын
@PhilippLackner Have you encountered this error at your production apps? The maximum limit of 500 simultaneous alarms has been reached for uid: ... I've searched a lot of forums but can't find a good solution. Thank you
@raheemadamboev
@raheemadamboev Жыл бұрын
I think USE_EXACT_ALARM is added on Android 13, so we still need to request it using SCHEDULE_EXACT_ALARM for Android 12 and Android 12L devices, am I right?
@simpleuxapps8759
@simpleuxapps8759 Жыл бұрын
Why using setexactandallowwhileidle and not setAlarmClock?
@iMagUdspEllr
@iMagUdspEllr 2 күн бұрын
Exact requires the alarm to ring on time exactly. Other choices permit the phone to delay the alarm. whileidle so that the phone will set off the alarm in low power mode. It's a more exact, but power intensive alarm.
@luisdanielmartinezbarrios532
@luisdanielmartinezbarrios532 Жыл бұрын
Nice video 👍 👌 😉
@moustafaelsaghier8552
@moustafaelsaghier8552 Жыл бұрын
That's the same I'm doing but on devices like ( OPPO - REDMI - XIAOMI ) is leading to not firing the alarm manger and it's working only if i removed ( manually ) app from being not optimized from bettary optimization screen in settings, can you help me in that?
@sufiyanshaikh3754
@sufiyanshaikh3754 5 ай бұрын
Heyy, Did you find any solution??. I also want to use an alarm manager to notify users at a specific time.
@damorpl
@damorpl Жыл бұрын
Thanks for the video. I was about to implement alarm manager so it was perfect timing. What about cancelling all alarms previously set?
@PhilippLackner
@PhilippLackner Жыл бұрын
As shown in the video use alarmManager.cancel
@damorpl
@damorpl Жыл бұрын
@@PhilippLackner In the video you show how to cancel individual alarm but I was wondering if the is a way to cancel all alarms at once
@deepsheth1086
@deepsheth1086 Жыл бұрын
hey philip! its good video but there is a problem it doesn't work if we kill the app...
@stivcabs1381
@stivcabs1381 Жыл бұрын
how can i make this for specific time, like alarm in the morning? i mean like alarm apps
@nabin625
@nabin625 Жыл бұрын
Thank you for this awesome video your videos really helps us to learn more, keep uploading. Also a simple query "Can anyone tell or have any resources links for mvvm clean architecture. Where we should put services, broadcast receivers related logic."
@maskedredstonerproz
@maskedredstonerproz Жыл бұрын
I personally make a framework layer for the actual services and whatnot, and in the domain layer just have a connection class or something like that. What I also want you to know is that people have just put them in the domain layer, so it largely depends on personal preference
@subhodas6268
@subhodas6268 8 ай бұрын
If i clear my app from resent app.........will my alarm work ok??
@LEEJIHUN
@LEEJIHUN Жыл бұрын
thanks!
@sebastianlang9034
@sebastianlang9034 29 күн бұрын
Hi, I am currently working on an app and would like to know if the AlarmManager only accepts a certain number of orders and how far in the future these may be. Currently, all orders that are more than two days in the future are not executed. :-(
@trocchiettoski
@trocchiettoski Жыл бұрын
a new suggestion, showing the new raamcosta navigation library with a navigation bar bottom (and as a bonus a screen with a detail ex clicking an item as in the stockapp you did)
@utkuduman7231
@utkuduman7231 Жыл бұрын
my phone (old zenfone 6, lolipop) does not turn on when the alarm rings, can this solution work?
@rahulbhandari8093
@rahulbhandari8093 Жыл бұрын
how to schedule alarm when the app is not in background ??
@LucasYamato
@LucasYamato Жыл бұрын
Hello I intend to buy your course wanted to know if in the videos has how to use subtitle Portuguese on the platform you make available the course as we do here on youtube.
@PhilippLackner
@PhilippLackner Жыл бұрын
The platform where I host them sadly doesn't support subtitles sorry!
@mannb1023
@mannb1023 Жыл бұрын
can you make a video on repeating alarms? Say a daily notification
@adrianbartoszek6635
@adrianbartoszek6635 2 ай бұрын
You look do good i didnt know if this is a programming or some buisness guy xd
@maurolanini9891
@maurolanini9891 Жыл бұрын
does the alarm manager only work with the background app? or also to wake up the closed app or are there alternatives for this operation?
@rahulbhandari8093
@rahulbhandari8093 Жыл бұрын
hey did you solve your query. i am stuck too??
@maurolanini9891
@maurolanini9891 Жыл бұрын
@@rahulbhandari8093 yeah schedule alarm can wake up the device
@techienomadiso8970
@techienomadiso8970 Жыл бұрын
Odin sends his regard @Philip 😅
@4ytonly
@4ytonly 6 ай бұрын
And if we don't use permissions in manifest, or use standard SCHEDULE_EXACT_ALARM do we need to ask user in code with a dialog to grant permission?
@Sandeepyadav-zr5ix
@Sandeepyadav-zr5ix 5 ай бұрын
I also need answer for this
@4ytonly
@4ytonly 5 ай бұрын
@@Sandeepyadav-zr5ix I solved this, this dont go as permission, but user has to go to settings and enable. Also you cant check this like the standard permission, you have to use alarmManager.canScheduleExactAlarms()
@CryptoCodeZone
@CryptoCodeZone Жыл бұрын
Please Explain var someVariable by mutableStateOf(value = "") private set The private set part
@PhilippLackner
@PhilippLackner Жыл бұрын
Only the viewmodel can change the value
@maskedredstonerproz
@maskedredstonerproz Жыл бұрын
3:47 Don't implementations go in the domain layer while the abstraction goes in data layer??
@PhilippLackner
@PhilippLackner Жыл бұрын
No the other way around
@bolokurowo5867
@bolokurowo5867 Жыл бұрын
Good
@abdy9415
@abdy9415 Жыл бұрын
👍👍
@nullpointerexception1052
@nullpointerexception1052 Ай бұрын
How come every single time I follow *any* scheduled alarm/notification tutorial, it *never* works
@weslleycampos
@weslleycampos Жыл бұрын
Workmanager para rodar no boot.
@rebecaalbuquerque96
@rebecaalbuquerque96 Жыл бұрын
Anyone having problem when the alarm trigger seconds is longer than 24 hours? I'm not receiving the notifications when is more than 24 hour, when is less than 24 hours it works
@jagnathreddy3544
@jagnathreddy3544 Жыл бұрын
How did you even do that? I'll passout waiting for the alarm
@loicjackotin9633
@loicjackotin9633 Жыл бұрын
Hey Philipp, I got some questions. Do you often update your paid courses? I want to buy some. And will you make a Discord server? I think it can be cool
@maskedredstonerproz
@maskedredstonerproz Жыл бұрын
He already has a discord server
@loicjackotin9633
@loicjackotin9633 Жыл бұрын
@@maskedredstonerproz really? Ok I will check it
@PhilippLackner
@PhilippLackner Жыл бұрын
Yes they're updated if there's a breaking change
@luisdanielmartinezbarrios532
@luisdanielmartinezbarrios532 Жыл бұрын
Can you do an application using that and jetpack compose?
@luisdanielmartinezbarrios532
@luisdanielmartinezbarrios532 Жыл бұрын
Like a alarm app with songs
@PhilippLackner
@PhilippLackner Жыл бұрын
@@luisdanielmartinezbarrios532 cool idea will put it on my list
@Skumfuk01
@Skumfuk01 Жыл бұрын
Does it still trigger if you kill the app?
@PhilippLackner
@PhilippLackner Жыл бұрын
Yes
@ibrahimkhalilshakir2414
@ibrahimkhalilshakir2414 Жыл бұрын
@@PhilippLackner if we kill the app. That's mean background service is not working. So, how the alarm trigger when app is not in background?
@doanvu7685
@doanvu7685 Жыл бұрын
how to make it interval day with min sdk: 21
@ano9161
@ano9161 Жыл бұрын
At first I thought I was watching on X1.5
@gauravthakkar802
@gauravthakkar802 Жыл бұрын
Why not use WorkManager?
@PhilippLackner
@PhilippLackner Жыл бұрын
Have you watched the video?
@gauravthakkar802
@gauravthakkar802 Жыл бұрын
@@PhilippLackner Oops, nope, but I'll do that now I was just curious since, AlarmManager is a mess atleast as per docs, and they push WorkManager themselves But seems like you've answered it, so I will watch it
@rahulbhandari8093
@rahulbhandari8093 Жыл бұрын
can you make it in java ?
@rahijain5199
@rahijain5199 Жыл бұрын
Hdjdd
@hugosalazar6911
@hugosalazar6911 Жыл бұрын
first
@gofudgeyourselves9024
@gofudgeyourselves9024 Жыл бұрын
Are you god?
@PhilippLackner
@PhilippLackner Жыл бұрын
Yes
@hemantjain9912
@hemantjain9912 Жыл бұрын
Hey, Can you please make one video on custom theming in jetpack Compose. How to implement and full guide. Thanks in advance
KMP vs. Flutter - Who Will Win The Cross-Platform Battle?
16:19
Philipp Lackner
Рет қаралды 40 М.
WorkManager - Android Basics 2023
34:22
Philipp Lackner
Рет қаралды 53 М.
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 45 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 26 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН
Bottom Nav Bar #03 | Material 3 | Jetpack Compose
12:21
Compose Campus | Code-Along
Рет қаралды 9 М.
Full Guide to Delegation in Kotlin  - Android Studio Tutorial
18:10
Philipp Lackner
Рет қаралды 67 М.
Custom layouts and graphics in Compose
20:25
Android Developers
Рет қаралды 51 М.
#3 Display Android notification at a particular time with Alarm Manager
5:59
Run a Repeatable Work from the Background using WorkManager
12:26
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 110 М.
Alarm Manager Explained in Android
16:29
Ahmed Guedmioui
Рет қаралды 808
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН