Answer the question
In order to leave comments, you need to log in
Why is Jetpack WorkManager not working at the right time?
I'm trying to trigger timed notifications using WorkManager from Jetpack. Accordingly, I have a Worker class in my application. It accepts the notification title and text as input parameters. The doWork() method describes the logic for displaying a notification. For the health test, I created a OneTimeWorkRequest in MainActivity and queued it for execution. But I can not understand why it is not executed at the right time. I created a date using Calendar, took the timestamp from the date, setInitialDelay specified TimeUnit MILLISECONDS. But nothing works. I will attach the MainActivity and Worker code below
https://pastebin.com/MaW7fdsd - Worker
https://pastebin.com/vEt8ikjc - MainActivity
Any help would be greatly appreciated.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question