mirror of
https://github.com/Michatec/Radio.git
synced 2026-03-31 23:46:28 +02:00
23 lines
557 B
Kotlin
23 lines
557 B
Kotlin
package com.michatec.radio.helpers
|
|
|
|
import android.app.DownloadManager
|
|
import android.content.BroadcastReceiver
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
|
|
|
|
/*
|
|
* DownloadFinishedReceiver class
|
|
*/
|
|
class DownloadFinishedReceiver : BroadcastReceiver() {
|
|
|
|
/* Overrides onReceive */
|
|
override fun onReceive(context: Context, intent: Intent) {
|
|
// process the finished download
|
|
DownloadHelper.processDownload(
|
|
context,
|
|
intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1L)
|
|
)
|
|
}
|
|
}
|