最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - How does workrequest setInitialDelay handle reboot - Stack Overflow

programmeradmin2浏览0评论

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).

发布评论

评论列表(0)

  1. 暂无评论