I am writing an app that needs to schedule a one-time notification for a time in the future. I'm generating the notification via WorkManager
.
In particular, I'm using setInitialDelay
for the request.
This is working in most cases - when the app is in Stop
state, for instance (not visible). But if I reboot the phone, the notification never occurs.
Is this the wrong approach to solving my problem? Does setInitialDelay
not do what I expect? The documentation suggests that WorkManager
is the right approach to this problem and that it should work even in the case of reboots (if I'm understanding it properly).