且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Toast 通知仅在应用程序被激活时弹出

更新时间:2021-08-20 02:46:28

我认为你做得比它需要的更难:) 如果你使用了 预定通知它会正常工作,您不需要任何后台任务.

I think you're making this harder than it needs to be :) If you used scheduled notifications it would just work and you wouldn't need any background tasks.

如果您确实想处理后台任务,可以使用 后台任务简介可能有帮助的白皮书.

If you do want to work with background tasks, there is the Introduction to Background Tasks whitepaper that may be of help.