I have a problem.
I use this code to read the content of a zip file:
File file = new File(TogglesManager.EXTERNAL_STORAGE_THEMES_DIRECTORY+"filename.zip");
ZipFile zip = new ZipFile(file);
But when I try to use an assets I have a FileNotFoundException.
To read asset zip file I use this code:
File file = c.getFileStreamPath("assetsFile.zip");
ZipFile zip = new ZipFile(file);
The “file” is not null, because if I write file.getName(); I see the correct file name.
I don’t want to use ZipInputStream class, but only ZipFile
You cannot access Assets using normal file operations. You will have to use
But since ZipFile does not take InputStream as a parameter, you will have to copy asset file onto internal storage and then use
FileFurther AFAIK, apk is zipped, so storing a zipped file inside assets might not change storage used by much, so maybe you donot need to use zipfile inside assets.