Basic implementation of wallpaper changing using WorkManager. May consider swapping to foreground service to increase reliability
This commit is contained in:
1 parent
0f975c9b20
commit
0bca639e3a
32 files changed
+377
-127
No files matched your search
@@ -1,11 +1,21 @@
|
||||
package com.anthonyla.paperize
|
||||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import androidx.work.Configuration
|
||||
import com.anthonyla.paperize.feature.wallpaper.workmanager.WallpaperWorkerFactory
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Application class for Hilt
|
||||
*/
|
||||
@HiltAndroidApp
|
||||
class App: Application() {
|
||||
class App: Application(), Configuration.Provider {
|
||||
@Inject lateinit var workerFactory: WallpaperWorkerFactory
|
||||
override val workManagerConfiguration: Configuration
|
||||
get() = Configuration.Builder()
|
||||
.setMinimumLoggingLevel(Log.DEBUG)
|
||||
.setWorkerFactory(workerFactory)
|
||||
.build()
|
||||
}
|
||||
Reference in new issue
Block a user