top of page

Android Shorts 🩳: WorkManager + Hilt

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



 





コメント


bottom of page