I want to download some audio files from the internet. I want to use downloadmanager to download this file but I don't know how to save these files to a specific internal storage location in android. InternalStorage/folder/filename.mp3
(so I can access them easily).
manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
Uri uri = Uri.parse("URL");
DownloadManager.Request request = new DownloadManager.Request(uri);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE);
long reference = manager.enqueue(request);
It is useful for downloading. But we cannot specify the location for these files.
So how to specify these files to be saved in the internal storage at a specific location. And also, how to access
and delete
these files.
Please don't devote this question as I got confused while going through many articles.
if any other better alternative or any suggestion comment down