Localized Raw Resources from Android Expansion Files - android

we are currently developing an app that features different localized speech samples located in the different raw-subdirs in the res folder. (raw, raw-de, raw-es, raw-it.. and so on).
Due to this speech samples, the app size exceeds the 50 MB limit on the Google Play Store.
Now I'm about to integrate the Expansion File Handling. I'd like to keep the English base-speech samples in the base package and put all the other samples in the Main Expansion file.
Now my question:
I read all the documentation, but couldn't find a proper answer: If the expansion file is downloaded properly - will Android use the localized speech samples from within the expansion file automatically? Or will I have to load them manually dependent on the current locale?
I mean, all the Resource ID's would be existing, based on the English base samples. Maybe there is some possibility to add localized resources after the app launch to the resource system?

Related

How it works when I use Play Asset Delivery without any settings?

I'm using Unity 2021.3.14 to create an Android mobile game. I looked up this document on Play Asset Delivery because the game is over 150mb.
There was a sentence like this.
Generated asset packs
Asset packs have download size limits.
To account for this, Unity changes how it generates asset packs depending on the size of your additional assets:
If the additional assets take less than 1GB of storage,
Unity packs everything into a single asset pack with the install-time delivery mode.
If you do not create any custom asset packs,
this means that the device downloads the asset pack as part of the application installation and,
when the user first launches the application,
all assets are available.
Could you check if the following is correct based on what I understood?
If an app of less than 1GB and build with Play Asset Delivery without configuration, it operates in install-time mode and is downloaded together when the user first runs the application.
After the installation is completed in the above manner, can I use them without additional code that connects resources inside the game?
The above question may be awkward because I am not familiar with English. I apologize in advance for that. Thank you for reading the question and have a nice day.

Android APK with pre-installed localized data

We have an Android application that supports up to 5 languages. If we were to pre-install a set of data, we would normally add 5 zip files (1 for each language). However, the data has since grown to be 100Mb each. As such, its not possible to package all the 5 zips in the assets folder.
What options do we have to creating a APK with pre-installed data? Is it possible for users to install a extension pack based on their device locale? Or do we have to upload 5 APKs in the Play Store, one for each language.
In documentation, it is given -
Google Play currently requires that your APK file be no more than
100MB . If your app exceeded 100MB, you had to host and download the additional resources yourself when the user opens the app.
Read this about APK Expansion Files.
Also, In this answer, it is given how to make .obb file as .zip file and upload it on Play Store.
OR
You can also make a check on App opens / or ask the user to download the language pack and download it directly from the server .(That would be simpler and easier one).

Self-hosting apk expansion files

I'm working on an Android digital library app and would like to provide a collections of sample resources in various languages - one collection in each language - ideally as apk expansion files. I understand that I can only have a maximum of two APK expansion files using Google Play Store.
This is a two-part question:
Is there a way to host the .obb files on my server?
If so, is there a way to select a particular .obb file to use? (in the app UI, offer the user a choice of languages in which to receive sample content.)

About Android Developer Program Policies, Could I download a dex file from another website and load it?

I want to reduce my android apk file size, so I split some function source code and compile those code to a Jar file, it contain a dex file in the jar file. When android app need use those functions, the app download the jar file and load dex file from it.
But I found the Android Developer Program Policies said:
An app downloaded from Google Play may not modify, replace or update
its own APK binary code using any method other than Google Play's
update mechanism
My question is do I do this a violation?
Yes because you're basically updating your APK without the Google Play's update mechanism. If you truly wish to minimize the .apk file size, you can put your resources online and request them through a custom api.
For example: I developed an app which uses Google Earth marker and polygon coordinates, descriptions and other useful information that are stored on my webserver, online in a .kml file. Because I'm constantly updating the file with new markers and polygons, I don't want the user to download the .apk file with a huge filesize each time I update my resources. So that's why I stored my resources online which the user downloads while using my app and that keeps the .apk filesize to less than 3MB which is great for the people who download the app through the play store. Otherwise the filesize would have been 15MB+ with all the images and other resources with that keeps on growing by each minute.
Nonetheless, the user would have to download the resources one way or another but I do like your way of thinking though to keep the size of the .apk file low as possible.

APK Expansion File Localization?

I have some very large (650MB) content files (video, audio) in about 4 different locales.
I want to use APK Expansion Files but they do not seem to support localization.
It seems we can have seperate application listings in Google Play as long as they have different application names (app listing filtered per locale).
What I do not understand is, if you upload the same application (in seperate application listings, same binary, same version), how does the device know where to get the expansion files from?
For instance, suppose I have 2 localized applications with seperate application listings:-
My App (UK) + Expansion File (UK)
My App (DE) + Expansion File (DE)
If the application I upload for both listings is the same binary, same version, I can't see how Google Play will know how to associate the app installed, with either of those listings?
This problem occured to me during testing whilst setting up 2 listings for DE and UK with the same draft APK.
Does anyone have any experience with this and is there a recommended approach? Any advice would be much appreciated.
Thanks in advance.
In order for you to upload it as two seperate listings, each application needs to have a different package name. Otherwise when you try to upload the second one, you'll get an error.
When you upload an APK, you also upload the expansion file, which is then associated with that particular APK (via package name). The device gets the expansion file from Google Play, which tracks that association.
All that said, there are disadvantages to uploading two identical APK's- Your ratings will be split across two apps, for instance, and ranking will suffer since neither one will get as many ratings as if you only had one APK covering both situations.

Categories

Resources