The documentation says MediaStore.Downloads
can be used, but it does not have any example of reading a downloaded file. All the examples I could find on the internet were about downloading and saving files using MediaStore.Downloads
, but all I want is reading an already downloaded file.
Let's say that I drag-and-dropped "sample.epub" file into the Android emulator. It is saved to the "Downloads" directory by the emulator. Now, how can I get a File
of this "sample.epub" so that I can pass it to the constructor of the ZipFile
class ?
File file = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_DOWNLOADS), "sample_epub");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.