Created
September 19, 2019 15:05
-
-
Save neonankiti/41294bc1ab39d6c92b39034e236c2671 to your computer and use it in GitHub Desktop.
Application class for WorkManager sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BisonApplication : Application() { | |
@SuppressLint("SimpleDateFormat", "HardwareIds") | |
override fun onCreate() { | |
super.onCreate() | |
val factory: AppWorkerFactory = DaggerBisonAppComponent.create().factory() | |
WorkManager.initialize(this, Configuration.Builder().setWorkerFactory(factory).build()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment