I have uploaded my application to the Play Store with a huge expansion 
(obb) file. Everything's working fine, no problem with that. But now I have 
to upload a small update to the expansion file. I want to use the patch 
expansion file because I don't want to force the users to download the big 
main expansion file again. In theory it's seems to an easy task.


>From the developer page:

// Get a ZipResourceFile representing a merger of both the main and patch 
filesZipResourceFile expansionFile = 
APKExpansionSupport.getAPKExpansionZipFile(appContext,
    mainVersion, patchVersion);`

I have used that in this form:

ZipResourceFile expansionFile 
=APKExpansionSupport.getAPKExpansionZipFile(appContext,
    14, 0);'

with no patch file and with no problem.


But if I try to modify this code, I got problems.


My current version is *19*, but I still use the main expansion file from 
the *14* version. When I tested my app I used 14 as the version number of 
my patch file (patch.14.com.exaple), copied the patch file directly to my 
phone and used this code:

ZipResourceFile expansionFile 
=APKExpansionSupport.getAPKExpansionZipFile(appContext,
    14, 14);

Everything's was fine, the app find the updated files in the 
ZipResourceFile so it's true, that the *"ZipResourceFile representing a 
merger of both the main and patch files"*...


I've tried upload the modified apk and the patch file in the developer 
console but after the upload I realised that it changed the patch file's 
name to the current version number: patch.19.com.exaple and I can't change 
it back to 14. So I cancel the upload and modified the code:

ZipResourceFile expansionFile 
=APKExpansionSupport.getAPKExpansionZipFile(appContext,
    14, 19);


But after that the app didn't find the updated files - it seems that it's 
only using the main file. I've tried to test it on my phone, changing the 
file names of the obb files and the code in the app, and I found, that this 
"merging" is working only if the version numbers are the same. But in this 
case the whole "main and patch obb files" is completly useless (at least in 
the context of APKExpansionSupport.getAPKExpansionZipFile) *because I can't 
upload a patch file later with a version number of an earlier release...*


I don't know if I've done someting wrong, so my question is:  *how can I 
get a ZipResourceFile that "representing a merger of both the main and 
patch files" if the version numbers are different in the two filenames?*

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1b2b171c-6abf-4986-9f5d-ce917a2686cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to