Question

I download some files in my app using the following DownloadManager.Request:

Request request = new Request(Uri.parse(url));          
request.setDestinationInExternalFilesDir(getActivity().getApplicationContext(),    
    Environment.DIRECTORY_DOWNLOADS, filename);

For legal issues, I want the files to be only accessible from the app.

Using my code I can see the files in the Download Manager app and I can share them from there.

How can I make the files only accessible and visible from my app?

Was it helpful?

Solution

How can I make the files only accessible and visible from my app?

Stop using DownloadManager and download the file yourself directly to internal storage.

Or, as soon as the file is downloaded, move it to internal storage. This will leave a window when the file is on external storage, though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top