I made a downloader and it works but the problem is when I download from mobile has no External storage it doesn't work
here is my code which does well for external storage :-
lateinit var downloadManager :DownloadManager
lateinit var request : DownloadManager.Request
downloadManager = getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
btndownload.setOnClickLisner{
request = DownloadManager.Request(Download_Uri)
request.setAllowedOverRoaming(false)
request.setTitle(songdownloadedname)
request.setDescription(null)
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, songdownloadedname)
request.setVisibleInDownloadsUi(true)
request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI or DownloadManager.Request.NETWORK_MOBILE)
downloadManager.enqueue(request)
}
What can I edit to download it to internal storage instead of external one ?