Requesting Diagnostic Information from WorkManager
WorkManager provides a way to get the following information:
- Requests that have been completed in the past 24 hours
- Requests that have been scheduled
- Running work requests
This information is available for debug builds. To get this information, run this command on your terminal:
adb shell am broadcast -a "androidx.work.diagnostics.REQUEST_DIAGNOSTICS" -p "com.raywenderlich.android.workmanager"
Your logcat displays the following information:
Where to Go From Here?
Download the final version of this project using the Download Materials button at the top or bottom of this tutorial.
Congratulations! You learned how to use WorkManager to run one-time, delayed, periodic, and long-running or important tasks in the background. You also learned how to write tests for your workers.
To learn more about WorkManager, check out the WorkManager official documentation.
I hope you enjoyed the tutorial. If you have any questions or comments, please join the forum discussion below.