Large apk deployment

Just starting out? Need help? Post your questions and find answers here.
munfraid
Posts: 104
Joined: Sat Mar 24, 2018 1:33 pm

Large apk deployment

Post by munfraid »

Hello everybody,

finally I finished my app and it's running wonderfully on my Android test devices. Since it contains thousands of images and sounds which are loaded dynamically during runtime, the file size is 254 MB.

The limit for the Google play store ist 100 MB, but I know there is a possibility to add extension files to your app. Those files seem to be more or less just simple zip files. But they will be installed in another directory if I understood right. So how can I access them from my app?

Unfortunately Spiderbasic doesn't handle this issue automatically. Does anybody has a clue on this? Thanks!
Andy
Posts: 46
Joined: Sat Feb 15, 2020 5:19 pm
Location: Larnaca, Cyprus
Contact:

Re: Large apk deployment

Post by Andy »

Hi. Take a look at the OpenFile() command.

https://www.spiderbasic.com/documentati ... nfile.html
#PB_LocalStorage: will save the file on client side using its filename when CloseFile() is called. This file
could be opened again in another session in the same browser later, but it can be wiped if the
user clear its local cache. It's also domain related, so if the application domain name change,
the files won't be accessible anymore.
I assume you have created an Android APK so you can probably ignore the bit about the user clearing the local cache but i'm not really sure, someone with experience would have to confirm this.
munfraid
Posts: 104
Joined: Sat Mar 24, 2018 1:33 pm

Re: Large apk deployment

Post by munfraid »

Hi Andy, thanks for the reply. I cannot see how the #PB_LocalStorage could help here. It's not about saving files, but loading them. Having the files in my ressource folder inside the apk, they can be opened using LoadImage() and LoadSound(). Putting them outside the apk into a seperated apk expansion file, this is not working anymore, because I don't know the path to the expansion file. Google saves these files in another place on the phone, a system folder for common storage. How can I get this path in Spiderbasic?

My problem is solved for now. After some heavy extra compression and sorting out some content, the apk size could be shrinked below 100 MB, so Google accepted it and it's now in the play store. It's not a very good solution, because now small updates for the app always cause big downloads for the users. Would be really great to have a solution for this in the future.
Andy
Posts: 46
Joined: Sat Feb 15, 2020 5:19 pm
Location: Larnaca, Cyprus
Contact:

Re: Large apk deployment

Post by Andy »

You can store your assets on a server and have the app download them when it first launches if they do not already exist in #PB_LocalStorage. Use CreateFile with the #PB_LocalStorage flag when you have downloaded the assets to save them.
munfraid
Posts: 104
Joined: Sat Mar 24, 2018 1:33 pm

Re: Large apk deployment

Post by munfraid »

Ah, now I understand, thanks for the explanation. This might be a much better solution for me. I will experiment with this.

Thanks a lot!
Post Reply