Reputation: 209
In my app, I want download a zip file and unzip it.
In DownloadManager
request I use this:
request.setDestinationInExternalPublicDir("/SingingStudio", "file.zip");
This is write file in external storage.
And when I want to access file:
String szip = Environment.getExternalStorageDirectory()+File.separator+"SingingStudio"+File.separator+"file.zip";
This is get file from internal storage. And getExternalStoragePublicDirectory("/")
too.
So I can not find the file .
Upvotes: 0
Views: 8252
Reputation: 1006819
Quoting the documentation for setDestinationInExternalPublicDir()
, the first parameter is "the directory type to pass to getExternalStoragePublicDirectory(String)
". That method, in turn, has a limited set of values it accepts, and "/SingingStudio"
is not one of them.
Upvotes: 1