THIS Is How You Schedule Alarms on Android with AlarmManager

  Рет қаралды 43,613

Philipp Lackner

Philipp Lackner

Күн бұрын

Пікірлер: 98
@sreeranjas6585
@sreeranjas6585 2 жыл бұрын
Man you are a legend the best teacher i was searching for this topic
@FemiOkedey
@FemiOkedey 2 жыл бұрын
This is a sore topic for me I just recently spent hours debugging. Thank you for this, it helps a lot
@GG9K71
@GG9K71 2 жыл бұрын
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
@zelotbe
@zelotbe 2 жыл бұрын
Thank you man! I just needed this for my project. I'm definitely gonna check out your premium courses.
@baharudinmaulana78
@baharudinmaulana78 2 жыл бұрын
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 2 жыл бұрын
Good channel bro 👍
@bolokurowo5867
@bolokurowo5867 2 жыл бұрын
You too good
@sercan272727
@sercan272727 Жыл бұрын
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
@denisgithuku8563
@denisgithuku8563 2 жыл бұрын
Eventually someone came out and gave us the real pill we needed
@simpleuxapps8759
@simpleuxapps8759 2 жыл бұрын
Why using setexactandallowwhileidle and not setAlarmClock?
@iMagUdspEllr
@iMagUdspEllr 6 ай бұрын
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.
@toxillo
@toxillo 5 ай бұрын
@@iMagUdspEllr They asked about setAlarmClock which also rings exactly on time and while the phone is in doze mode.
@Leon-un2ii
@Leon-un2ii 2 жыл бұрын
Thank you sooo much for making a video about this topic, which I wished before!
@moustafaelsaghier8552
@moustafaelsaghier8552 2 жыл бұрын
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 11 ай бұрын
Heyy, Did you find any solution??. I also want to use an alarm manager to notify users at a specific time.
@gouravrawatscience
@gouravrawatscience 2 жыл бұрын
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 11 ай бұрын
@@ka61er we need to enable autostart on the above phones. Otherwise, it kills workmanager and job scheduler.
@GG9K71
@GG9K71 5 ай бұрын
are exact alarms killed too?
@Akshaykumar-xr9yj
@Akshaykumar-xr9yj Жыл бұрын
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 Жыл бұрын
data/repository - AndroidAlarmSchedulerImpl domain/model - AlarmItem domain/repository - AndroidAlarmScheduler presentation - BroadcastReceiver
@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
@giovanni_siciliano_ivano
@giovanni_siciliano_ivano 2 жыл бұрын
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
@venkateshlingampally7220
@venkateshlingampally7220 2 жыл бұрын
Thankyou so much for this video 🔥🔥 you are just osm man 🤯
@kenali4612
@kenali4612 2 жыл бұрын
Thanks philipp!
@arunrajkumard5238
@arunrajkumard5238 2 жыл бұрын
You always rocking...
@Mohamed_sanoob
@Mohamed_sanoob 2 жыл бұрын
Most wanted tutorial ❤️❤️❤️👍
@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
@4ytonly
@4ytonly Жыл бұрын
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 11 ай бұрын
I also need answer for this
@4ytonly
@4ytonly 11 ай бұрын
@@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()
@damorpl
@damorpl 2 жыл бұрын
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 2 жыл бұрын
As shown in the video use alarmManager.cancel
@damorpl
@damorpl 2 жыл бұрын
@@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
@KumarSiddhant-j9w
@KumarSiddhant-j9w 7 ай бұрын
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 2 жыл бұрын
Hi Philipp, please make some videos about AOSP integration and its use in Android Studio projects. Thank you..
@pavan-m3k
@pavan-m3k Жыл бұрын
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
@giovanni_siciliano_ivano
@giovanni_siciliano_ivano 2 жыл бұрын
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)
@deepsheth1086
@deepsheth1086 Жыл бұрын
hey philip! its good video but there is a problem it doesn't work if we kill the app...
@maurolanini9891
@maurolanini9891 2 жыл бұрын
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
@LucasYamato
@LucasYamato 2 жыл бұрын
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 2 жыл бұрын
The platform where I host them sadly doesn't support subtitles sorry!
@nicolasnguyen1611
@nicolasnguyen1611 11 ай бұрын
@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
@So7696
@So7696 2 жыл бұрын
Thank you Philip
@gelsonschikorski8158
@gelsonschikorski8158 2 жыл бұрын
Awesome!
@proandroiddevir
@proandroiddevir 2 жыл бұрын
Thank you Philip🙏🙏🙏🙏👏👏👏👏👏👏👏👏👏👏👏
@raheemadamboev
@raheemadamboev 2 жыл бұрын
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?
@sebastianlang9034
@sebastianlang9034 6 ай бұрын
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. :-(
@hemantjain9912
@hemantjain9912 2 жыл бұрын
Hey, Can you please make one video on custom theming in jetpack Compose. How to implement and full guide. Thanks in advance
@mikelantzelo
@mikelantzelo 2 жыл бұрын
Thank you!
@rahulbhandari8093
@rahulbhandari8093 Жыл бұрын
how to schedule alarm when the app is not in background ??
@有点意思-w9e
@有点意思-w9e 4 ай бұрын
同问
@nabin625
@nabin625 2 жыл бұрын
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 2 жыл бұрын
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
@luisdanielmartinezbarrios532
@luisdanielmartinezbarrios532 2 жыл бұрын
Nice video 👍 👌 😉
@stivcabs1381
@stivcabs1381 Жыл бұрын
how can i make this for specific time, like alarm in the morning? i mean like alarm apps
@subhodas6268
@subhodas6268 Жыл бұрын
If i clear my app from resent app.........will my alarm work ok??
@adrianbartoszek6635
@adrianbartoszek6635 8 ай бұрын
You look do good i didnt know if this is a programming or some buisness guy xd
@Skumfuk01
@Skumfuk01 2 жыл бұрын
Does it still trigger if you kill the app?
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Yes
@ibrahimkhalilshakir2414
@ibrahimkhalilshakir2414 2 жыл бұрын
@@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?
@CryptoCodeZone
@CryptoCodeZone 2 жыл бұрын
Please Explain var someVariable by mutableStateOf(value = "") private set The private set part
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Only the viewmodel can change the value
@luisdanielmartinezbarrios532
@luisdanielmartinezbarrios532 2 жыл бұрын
Can you do an application using that and jetpack compose?
@luisdanielmartinezbarrios532
@luisdanielmartinezbarrios532 2 жыл бұрын
Like a alarm app with songs
@PhilippLackner
@PhilippLackner 2 жыл бұрын
@@luisdanielmartinezbarrios532 cool idea will put it on my list
@nullpointerexception1052
@nullpointerexception1052 7 ай бұрын
How come every single time I follow *any* scheduled alarm/notification tutorial, it *never* works
@loicjackotin9633
@loicjackotin9633 2 жыл бұрын
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 2 жыл бұрын
He already has a discord server
@loicjackotin9633
@loicjackotin9633 2 жыл бұрын
@@maskedredstonerproz really? Ok I will check it
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Yes they're updated if there's a breaking change
@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
@utkuduman7231
@utkuduman7231 Жыл бұрын
my phone (old zenfone 6, lolipop) does not turn on when the alarm rings, can this solution work?
@gauravthakkar802
@gauravthakkar802 2 жыл бұрын
Why not use WorkManager?
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Have you watched the video?
@gauravthakkar802
@gauravthakkar802 2 жыл бұрын
@@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
@LEEJIHUN
@LEEJIHUN 2 жыл бұрын
thanks!
@techienomadiso8970
@techienomadiso8970 2 жыл бұрын
Odin sends his regard @Philip 😅
@weslleycampos
@weslleycampos 2 жыл бұрын
Workmanager para rodar no boot.
@doanvu7685
@doanvu7685 Жыл бұрын
how to make it interval day with min sdk: 21
@bolokurowo5867
@bolokurowo5867 2 жыл бұрын
Good
@abdy9415
@abdy9415 2 жыл бұрын
👍👍
@ano9161
@ano9161 Жыл бұрын
At first I thought I was watching on X1.5
@rahijain5199
@rahijain5199 2 жыл бұрын
Hdjdd
@rahulbhandari8093
@rahulbhandari8093 Жыл бұрын
can you make it in java ?
@hugosalazar6911
@hugosalazar6911 2 жыл бұрын
first
@hemantjain9912
@hemantjain9912 2 жыл бұрын
Hey, Can you please make one video on custom theming in jetpack Compose. How to implement and full guide. Thanks in advance
Should You Use Compose State or StateFlow in Your ViewModels?
13:59
Philipp Lackner
Рет қаралды 86 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 230 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
The ULTIMATE Guide to Sharing Data Between Screens in Jetpack Compose
24:08
Run a Repeatable Work from the Background using WorkManager
12:26
Kotlin Multiplatform vs Flutter: Which should we use?
4:42
Kei Fujikawa
Рет қаралды 29 М.
Dagger-Hilt vs. Koin vs. Manual Dependency Injection - Pick THIS
21:27
How does a USB keyboard work?
34:15
Ben Eater
Рет қаралды 3,3 МЛН
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 144 М.
How to ACTUALLY wake up early: A “Miracle Morning” Routine
11:56
David Bangean
Рет қаралды 2,1 МЛН
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 44 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН