My app uses the DownloadManager to download files to a subdirectory of the device's Music folder.
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
...
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC) + "/MyStuff/song.mp3");
request.setDestinationUri(Uri.fromFile(file));
I have noticed that the files are being deleted when the app is uninstalled from a device running Marshmallow (this is not happening on older OS versions). Do you have any ideas about this?
Thanks
addCompletedDownload()
. – Rock