adb command to list all scheduled work using workmanager

老子叫甜甜 提交于 2020-07-19 06:00:47

问题


Is there a adb shell (dumpsys) command that will give a detailed info of all the tasks scheduled using workmanager - PeriodicWorkRequest

Basically I have a scheduled task which should run daily. How do I get when Is the next task scheduled using adb.

Will adb shell dumpsys alarm package.name list my scheduled work using workmanager


回答1:


Given that WorkManager stores all the WorkRequest in a Room database, your bet bet is to retrieve that DB and look into it.

For adb as far as I know, your best bet is to use what is available for JobScheduler (that WorkManager uses for API Level 23+ devices):

adb shell dumpsys jobscheduler

as answered here.

Update January 2020 More information on how to debug WorkManager is now available in the official documentation: Debugging WorkManager.



来源:https://stackoverflow.com/questions/55879642/adb-command-to-list-all-scheduled-work-using-workmanager

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