I donβt believe that. As you mentioned, it is easy to use ZipFile with the actual file in the file system, but not so for the file embedded in your application.
To access the zip file in the APK, you will need to use something like Resources.openRawResource(R.raw.zip_file) , and then wrap the returned InputStream in a ZipInputStream and do it in the usual Java way, rather than using the Android method.
Alternatively, if you really need to use the ZipFile class, you can extract the zip file from the APK to the SD card or, more reliably, to the local storage of your application.
source share