How to use WorkManager to run a long running job in Foreground

感情迁移 提交于 2019-12-08 10:34:14

问题


Due to the problem mentioned in Proper way to tackle and resolve "Excessive network usage (background)" , I plan to move the long running task (sync to cloud) from background to foreground.

Currently, I start my delayed WorkManager in Application's onPause

I was planning to use WorkManager, to launch an IntentService's startForeground - Android - implementing startForeground for a service?

But, WorkManager itself unable to launch a Service. May I know how I can achieve so?

Is there a way, to use WorkManager to run a long running job in Foreground (With visible UI, like progress bar)

来源:https://stackoverflow.com/questions/54602888/how-to-use-workmanager-to-run-a-long-running-job-in-foreground

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!