I want to start work to perform at 8:00 am on a specific date. Is there any way to perform this task using AlarmManager
?
Asked
Active
Viewed 106 times
-3

Hadi Attar
- 73
- 1
- 1
- 5
-
2Possible duplicate of [Schedule a work on a specific time with WorkManager](https://stackoverflow.com/questions/50363541/schedule-a-work-on-a-specific-time-with-workmanager) – Ikazuchi Jul 30 '19 at 06:34
-
Alarm Manager is a better option. – Gaurav Mall Jul 30 '19 at 06:39
1 Answers
-1
You should use AlarmManager instead of work manager. Work Manager is made for things which are deferrable and guaranteed, meaning it can be done later and not crucially now. To have some background service which does work that has to happen at an exact time and is guaranteed consider using AlarmManager.
There's also this StackOverflow answer: Alarm Manager Example
There's no need to waste time by trying to implement work manager for your task.
Edit: My bad, the example was an old link. Messy it is!

Gaurav Mall
- 2,372
- 1
- 17
- 33