Код: Выделить всё
webview.setDownloadListener { url, userAgent, contentDisposition, mimetype, l ->
val request = DownloadManager.Request(Uri.parse(url))
request.setTitle(URLUtil.guessFileName(url, contentDisposition, mimetype))
request.setDescription("Downloading file...")
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
var newuri=FileProvider.getUriForFile(context, "com.shyptsolution.classproject"+ ".provider", File(context.filesDir,"fileName"))
// request.setDestinationUri(newuri)
request.setDestinationInExternalPublicDir(
context.filesDir.absolutePath,
URLUtil.guessFileName(url, contentDisposition, mimetype)
)
val dm =context.applicationContext.getSystemService(DOWNLOAD_SERVICE) as DownloadManager
dm!!.enqueue(request)
}
Я просто хочу видеть свои файлы в папке files, показанной на рисунке ниже.

Подробнее здесь: https://stackoverflow.com/questions/713 ... p-internal
Мобильная версия