The following Code seems to work fine on API Levels 11 and above:
private ZipInputStream getFileFromZip(InputStream zipFileStream) throws FileNotFoundException, IOException {
ZipInputStream zis = new ZipInputStream(zipFileStream);
ZipEntry ze = null;
while ((ze = zis.getNextEntry()) != null) {
Log.w(ACTIVITY_LOG_TAG, "extracting file: '" + ze.getName() + "'...");
return zis;
}
return null;
}
But throws an IOException
when running under, e.g. 10 or 8. I want to support those APIs as well in my app, so I need to bring this to work...
I checked all the filenames, paths etc. And again, under 3.0 it works. I also am using actionbarsherlock, although that should not impact the zip Input stream.
Does anyone have any ideas???