Search code examples
androidmvvmandroid-architecture-componentsandroid-workmanagerandroid-mvvm

What is right place to start a WorkManager in MVVM architecture Android?


I have a workmanager that every five hours picks up a word from the roomdb and Notification it

I do not know where is the righ place to put the work manager in the MVVM architecture. Should I use in ViewModel or Repository?


Solution

  • For the workmanager you only have worker classes, so you need to create a new package named workers or workmanager and place your workers in that package.