Skip to content

Instantly share code, notes, and snippets.

@pfmaggi
Created March 31, 2020 17:37
Show Gist options
  • Save pfmaggi/ea9705935898bae852c4757faf9a227e to your computer and use it in GitHub Desktop.
Save pfmaggi/ea9705935898bae852c4757faf9a227e to your computer and use it in GitHub Desktop.
Code for the Medium article: "Customizing WorkManager"
/* Copyright 2020 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
class MyApplication : Application(), Configuration.Provider {
// other @Inject variables
lateinit var appComponent: AppComponent
override fun onCreate() {
super.onCreate()
appComponent = DaggerAppComponent.factory().create(applicationContext)
appComponent.inject(this)
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment