-3

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?

Hadi Attar
  • 73
  • 1
  • 1
  • 5

1 Answers1

-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