android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.36k stars 8.28k forks source link

(Issue #1059) WorkManagerSample to use Hilt and App Startup #1060

Open DivS-15 opened 2 years ago

DivS-15 commented 2 years ago

closes #1059 Following changes were made:

  1. WorkManager instance is initialized on-demand using the app-startup library and injected in the FilterViewModel using Hilt and @Provides method.
  2. Workers now use @HiltWorker along with Assisted injection.
  3. Complete app uses Hilt for dependency injection.
DivS-15 commented 1 year ago

@dlam @ianhanniballake Could you please look into this? This might improve the sample.