-
Notifications
You must be signed in to change notification settings - Fork 352
Open
Description
try {
val okHttpClient = OkHttpClient.Builder().build()
val config = FetchConfiguration.Builder(context.applicationContext)
.setDownloadConcurrentLimit(maxConcurrentDownloads)
.enableLogging(true)
.enableRetryOnNetworkGain(true)
.setAutoRetryMaxAttempts(3)
.enableAutoStart(false)
.setHttpDownloader(OkHttpDownloader(okHttpClient))
.setGlobalNetworkType(NetworkType.ALL)
.enableFileExistChecks(false)
.enableAutoStart(false)
.setNotificationManager(object : DefaultFetchNotificationManager(context) {
override fun getFetchInstanceForNamespace(namespace: String): Fetch {
return fetch
?: throw IllegalStateException("Fetch instance not initialized")
}
})
.build()
fetch = Fetch.getInstance(config)
fetch?.removeAll()
} catch (_: Exception) { }
Nothing happens when I click on the notification buttons!
Metadata
Metadata
Assignees
Labels
No labels