Changing assets between releases - android

Does anyone know if the old assets get removed from the assets folder when an app is re-released / updated on the Play Store? I want to include an new and updated database with my re-releases, but really don't want the out of date ones taking up space on the users' phones.

It doesn't get removed if you made any changes in assets folder, while creating the release APK delete the build folder and create the APK.

Related

Google PlayStore console 2017 - obb extension file upload

I am using APK with external OBB Extension file.
PlayStore Console UI has changed since I used this feature last.
I can not figure out how to upload the OBB file.
Even the PlayStore help describes the wrong, old way.
https://support.google.com/googleplay/android-developer/answer/2481797?hl=de
Can someone please give me a hint.
Seems to be solved - the small + button was missing in the German UI Version. I changed my language to English and the + button was there. Now in 2018 the + button is also visible in the German UI. Thanx Google
I've been able to chat with Google support about this, and it's indeed kind of hard to miss. This is not like before where you could set the expansion file at APK upload anymore.
To upload an expansion file or use an existing expansion file, you can only do that while uploading the APK, not after you click on Save.
Once you uploaded the APK, on the line where the APK name is, there's a small + icon with the tooltip "Update APK", you have to click on this icon, and there there's the ability to set/upload expansion file.
In this case you have tu use the JOBB tool to encapsulate the resource files, having your .APK then you can go to https://play.google.com/apps/publish/
then Release management > App Releases , you have the option to test your app first MANAGE ALPHA or MANAGE BETA or publish directly to producction MANAGE PRODUCTION, create a Draft Release.
And then Add or change expansion files
You can upload new or add existing expansion files to APKs in a draft release.
Go to your Play Console.
Select your app.
On the left menu, click Release management > App releases.
Next to the release type you want to update, select Manage.
Drop or select your app's APK file.
You'll see a list of APKs that are associated with your release. Next to the relevant version code, select the add icon .
Choose whether you want to upload a new file or attach an existing expansion file.
If the APK hasn't been published yet, you can change or remove an expansion file by selecting another file or No expansion file. You
can't remove expansion files from an existing release.
Select Save.
This is the current documentation for APK Expansion Files
Read the checklist to use Expansion files in your application:
Development checklist
Here's a summary of the tasks you should perform
to use expansion files with your application:
First determine whether your application absolutely requires more than 100MB per installation. Space is precious and you should keep
your total application size as small as possible. If your app uses
more than 100MB in order to provide multiple versions of your graphic
assets for multiple screen densities, consider instead publishing
multiple APKs in which each APK contains only the assets required for
the screens that it targets.
Determine which application resources to separate from your APK and package them in a file to use as the main expansion file. Normally,
you should only use the second patch expansion file when performing
updates to the main expansion file. However, if your resources exceed
the 2GB limit for the main expansion file, you can use the patch file
for the rest of your assets.
Develop your application such that it uses the resources from your expansion files in the device's shared storage location. Remember that
you must not delete, move, or rename the expansion files. If your
application doesn't demand a specific format, we suggest you create
ZIP files for your expansion files, then read them using the APK
Expansion Zip Library.
Add logic to your application's main activity that checks whether the expansion files are on the device upon start-up. If the files are
not on the device, use Google Play's Application Licensing service to
request URLs for the expansion files, then download and save them. To
greatly reduce the amount of code you must write and ensure a good
user experience during the download, we recommend you use the
Downloader Library to implement your download behavior. If you build
your own download service instead of using the library, be aware that
you must not change the name of the expansion files and must save them
to the proper storage location.

Can Android replace the contents of the assets folder when an app is updated?

I am developing an app using android studio that delivers information in text files stored in the assets folder. The app works, but if I change the text in the files, I have to uninstall and then reinstall the app to make the changes permanent. However, if I make changes to the app code, the changes take place when the app is updated. I want the assets folder to update in the same way. Is there some way to avoid reinstalling the program to update both code and assets, especially when updating apps to the playstore?
Thanks.

Android app update, assets update

I have an app and it uses .txt files from assets folder. In assets folder are more directories in some depth.
Later I will want to add new files to this assets folder so I'll have a new apk(cause files in assets are part of the apk).
The question: So what happens when someone, who is using my app, wants to update my app(with new files in assets) through Google Play, will it uninstall his old version and install the new one or how he receive these new files?
Or simpler: What happens during an app update?
Could someone make me keen vision in this a little? Thanks.
The old app is just replaced by the new app.
You don't have to worry about that. Apps are always installed completely without loosing data. That is, the .apk file is just replaced. So your assets will be also updated automatically.
Here an example:
Google Play Store downloads the new .apk file.
Next, it replaces the old apk file in /data/app/ by your new apk file.
That means that all the stuff that is in your new app is now available.
In this way the whole application is replaced.

How to update my game made with Unity running on Android?

My game have 100M asset bundles, I put the budle files into the StreamingAssets folder(I want to release my apk as one whole app, not the downloading when playing style), then I built my project into one apk file, then I installed the apk file to my device.
But how can I update my bundles when my game find one new update is available? The StreamingAssets folder on Android is read-only.
One solution is that: copy the bundles in the StreamingAssets folder to somewhere like the Android's External Storage, then use bundles in the External Storage. But this will increase my game size from 100M bundles to 200M.
So on Android when I install one apk, can I install some files meanwhile into somewhere writable?
Anyone can help me? Thanks.
Not sure if I understood: you shouldn't use asset bundles if you are not, at some point, going to update them or have new assets to download in-game.
So just use regular prefabs and use the regular Android update process to update the application.
But if you want to have asset updates in-game then you use asset bundles, put them on StreamingAssets and use WWW.LoadFromCacheOrDownload(string url, int version) to load them; when a new version of your asset is available you change the version in that call and it will just download and cache the new version.

Copying android .apk to another .apk file through java code and over-ride its assets files?

is it possible to create .apk file by copying an already existing .apk file and modifying its assets folder? I have some information in a file in assets folder containing server ip and port to which the user is to connect. Users are from different regions and have to connect through different servers. can anyone tell me how to implement this?
I've added a comment with my recommended solution to this problem. However, here's an answer to your question:
Of course you can unpack the APK, swap out the assets and then create a new APK from that. However, you will need to sign the APK again with the correct key.
If you are building the apps yourself, you can just build multiple APKs, each containing a different asset file. However, you would have to distribute these APKs by hand (ie: they can't be uploaded to Google Play) because they would each have the same package name and you cannot have multiple apps in the app store with the same package name.

Categories

Resources