DE
Size: a a a
DE
QH
QH
QH
S
S
2_
SG
SG
QH
SG
SG
E
SG
СП
SG
QH
S
private fun downloadAudio(name: String, url: String) {Почему файл скачивается через раз?
val folderName = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC)
val request = DownloadManager.Request(Uri.parse(url))
.setTitle("Audio")
.setDescription("Downloading")
.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
.setDestinationUri(Uri.fromFile(File(folderName, name)))
.setAllowedOverMetered(true)
val downloadManager=getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
downloadManager.enqueue(request)
}
S
S