Can I use main expansion file as optional download option in application? So I don't need download it with APK file but later when user would do it.
When you create an expansion file, it should be something like
[main|patch].<version>.<package_name>
main, is for files that you're app needs to run, so you choose patch. The version is the same apk version you are uploading the expansion file with. If your apk version is 7 you should name the expansion file as follow:
patch.7.com.yourpackagename
You then zip it, and upload to google play!
Related
According to https://stackoverflow.com/a/53458191/1635488 if we publish aab files, the mapping files will automatically be taken from there. What happens if we upload it anyway? Will it override the one from the aab file?
The place where I can upload it is here: "ReTrace mapping file"
I did an experiment and can confirm that if we upload only aab file, mapping file will be taken from the aab. If we also upload a separate mapping file, it will override the one in the aab.
Some time ago I've released a beta version of my app and connected it with an APK Expansion File. Then I wanted to update my APK without touching the files and did following:
The version code of my app was 7 and the provider also had this value. The provider looks like following in my manifest:
<provider
android:name=".expansion.MyApezProvider"
android:authorities="com.bla.blabla"
android:exported="false"
android:multiprocess="true"
>
<meta-data
android:name="mainVersion"
android:value="7">
</meta-data>
</provider>
And here is a snippet of my Downloader Activity:
private static final XAPKFile[] xAPKS = {new XAPKFile(true, // true signifies a main file
7, // the version of the APK that the file was uploaded
383989643L // the length of the file in bytes
)};
I've only incremented the version code value in the manifest from 7 to 8. Because I didn't wanted to touch the expansion file. Therefore the value in the provider and Downloader Activity were still 7.
I've uploaded the new APK File and did not choose the uploaded APK Expansion File again. But this did not work. After the Users updated to the new version the video files in the app are no more available.
So I uploaded the APK File again and re-upload the APK Expansion File and that works. But that's very strange because the user have to download the expansions for every single update.
My question is: When I upload the new apk to the Google Play Console do I have to choose always the stored apk expansion file or re-upload it again?
Is the behavior of APK Expansion Files different in beta and relased version?
In the following post Updating an APK in Google Play without changing the expansion file it says that this behavior only happens in draft mode but my app is not in draft mode. It is published as beta.
I would be very thankful for your help.
You have to upload both files as this is the normal way.
Each time you upload an APK using the Google Play Console, you have the option to add one or two expansion files to the APK. Each file can be up to 2GB and it can be any format you choose, but we recommend you use a compressed file to conserve bandwidth during the download. Conceptually, each expansion file plays a different role:
The main expansion file is the primary expansion file for additional resources required by your application.
The patch expansion file is optional and intended for small updates to the main expansion file.
While you can use the two expansion files any way you wish, we recommend that the main expansion file deliver the primary assets and should rarely if ever updated; the patch expansion file should be smaller and serve as a “patch carrier,” getting updated with each major release or as necessary.
However, even if your application update requires only a new patch expansion file, you still must upload a new APK with an updated versionCode in the manifest. (The Play Console does not allow you to upload an expansion file to an existing APK.)
Note: The patch expansion file is semantically the same as the main expansion file—you can use each file any way you want. The system does not use the patch expansion file to perform patching for your app. You must perform patching yourself or be able to distinguish between the two files.
You can find more details here https://developer.android.com/google/play/expansion-files.html
Hi guys I am new to android application. recently I am developing one application.It works well and fine. But my problem is application contains the audio's and sequence images(nearly 10000 images)by the end of the project apk size is 530 MB. how to create the expansion file for that project. i want to upload the project into play store. please guys anyone help me to create how the expansion files are created for that project.
I follow this website http://developer.android.com/google/play/expansion-files.html but I can not under stand properly. please any help me
An expansion file is typically just a zip archive of the things you want to have in it. Use your favorite ZIP tool to generate it.
Your expansion file name format should be : [main|patch]...obb
Gather all your contents inside a folder and rename the folder as per the naming format above and with .zip as extension.
For eg: main.1.com.your.packagename.zip.
Now you can upload this expansion file along with the apk.
It thinks my two expansions files are:
main.3.com.jenny.test.obb (49.7 MB)
patch.2.com.jenny.test.obb (49.7 MB)
But, I only uploaded one .obb file, and it wasn't the one labeled "patch". Additionally, if I try to modify the app at all, I get an error saying it cannot delete the 2nd version because the third version relies on it. I can't modify anything!
Am I correct that this extra "patch" file is wrong? If it is, how do I remove it? I manually increased my version (it was originally doing it for version 2, with a patch of 1), and upload a new file, it doesn't help at all.
My .obb and .apk are being generated through Unity, if that matters.
i got the same error last week. The obb file was added twice.
Since you can't remove the patch file for an apk that is already uploaded, you have to upload a new apk.
I recommend you to increase the build-number of your Project, build the splitted apk+obb again and upload them again to the console.
Be sure to add the new obb as expansion file and that no "patch"-file is selected (since you won't be able to change it later)
I have read all the documentation about APK Expansion for Android.
I have a simple question:
I have an application that is about 5mb of code and has 40mb of assets files. These assets files will be updated in further release of the app, so I have implemented the APK Expansion.
Now, I have to publish the apk and the obb files on the google play console.
Documentation says that "main" must be used for files necessary to run the app, and "patch" for optional files. In my case my assets file are optionals and will be updated togheter with the app apk code change, so what files I need to upload?
The apk and a file zip named main.<expansion-version>.<package-name>.obb ?
The apk and a file zip named patch.<expansion-version>.<package-name>.obb ?
Or the apk and file zip containing both the two files? In this case which name I had to use?
Thanks in advice
You need to upload the apk and the zip with .zip extension. Google play console will convert to .obb format, you don't need to care about it.