top of page
Search

Android Shorts 🩳: WorkManager + Hilt

  • Writer: Costa Fotiadis
    Costa Fotiadis
  • Apr 1, 2023
  • 1 min read

Updated: May 13, 2023

Add (more) dependencies


Declare a dagger module

Make it easy to inject the singleton WorkManager instance anywhere.

Debug logging level is optional.



Customize the application class

We already declared the WorkConfiguration up above in the dagger module.

Might as well use it.



Fix up the manifest


Declare a worker to try things out

Assisted is the trick here.



Use WorkManager anywhere



 





 
 
 

Comments


bottom of page