1
I need to read files from an EXPANSION FILE.
In the first Log in which I print expansionFile is working perfectly, ie I was able to read the zip file, but while trying to access the files from inside the zip as it guides the documentation http://developer.android.com/google/play/expansion-files.html the file returns null
ZipResourceFile expansionFile = null;
try {
expansionFile = APKExpansionSupport.getAPKExpansionZipFile(context,
2, 1);
} catch (IOException e) {
e.printStackTrace();
}
Log.d("DEBUG", expansionFile + "expansionFile");
AssetFileDescriptor fd = expansionFile.getAssetFileDescriptor("enterprise/config.json");
Log.d("DEBUG", fd + "FILE");
The Zip file has the following organization
/enterprie
/0
/config.json
Someone knows the problem?
Igor, take a look at this question and my answer to see if it helps your problem: http://answall.com/q/31107/6436
– Wakim
I didn’t understand the use of the Providervideozipuri class in Question
– Igor Ronner
Actually I suspect it might be a problem in the versions of the extension (mainVersion and patchVersion) and apk. If they are different and you do not specify correctly, it will not find the extension and will return null.
– Wakim
The extension has already been found, Log appears, but when I try to access the ZIP files it gives null
– Igor Ronner
I thought the problem would be the way, but I’ve tried a lot of stuff and it didn’t work
– Igor Ronner