alternatives for overcoming the 10MB limit for app inventor?

394 views
Skip to first unread message

Nathan Wilson

unread,
Nov 27, 2018, 1:32:57 AM11/27/18
to MIT App Inventor Forum

Hey everyone,
Is there any alternatives anyone knows about for overcoming the 10MB limit on App inventor? I have been through Taifun's and TimAI2's great ideas and examples for downloading the files on first run, but I am wondering if there is any other ways to do it. I need to be able to package my app for google play and it is going to be more than 10MB. I was using the code.appinventor.mit.edu server, but it has no build option for google play. And I also don't want to download all of the assets directly onto the phone in the downloads folder either, which is what Taifun's example does, https://puravidaapps.com/filebyfile.php. The app should also work without internet connection, which means I can't use urls for my image files. I have been through Enis' tips for reducing file size, http://twodogapps.com/?page_id=686#ShrinkingAIA, and yes, I need all of the images, and yes, I have resized them so that they have smaller file sizes. So I am wondering, what else can I do? Would one of the other app inventor programs work better for what I need? Like Kodular or something? I don't know if it has a 10MB limit or not.
If anyone has any ideas I would appreciate it.
Thanks

Chris Ward

unread,
Nov 27, 2018, 7:45:22 AM11/27/18
to MIT App Inventor Forum
Hi Nathan

Well, if the app has to work without an internet connection, all the assets must be saved on the device somewhere, somehow. What we need to know is, how big is the App without the images as assets in the Project and what is the total size of the images 'bundle'? 

The commercial AI offsprings such as AppyBuilder and Kodular might allow for huge Apps (all image assets embedded), it is a question of how huge :)

There are snags if you move your project to an offspring - most likely your App Inventor Project will not look the same in the other's IDE, so some re-working will be required. It will be impossible to use AI for the Project at a later date if saved by an offspring - it's basically a one-way street. You might not get the level of technical support that the MIT Power Users deliver for App Inventor.........





ndrorian

unread,
Nov 27, 2018, 11:41:39 AM11/27/18
to MIT App Inventor Forum
Hi Nathan,

As a last resort, can you split the App into 2 or more Apps? The first App should load/call the other Apps as needed. I haven't done this and I don't know how smooth/transparent it will be for users. 

Nathan Wilson

unread,
Nov 27, 2018, 2:33:07 PM11/27/18
to MIT App Inventor Forum
Hi Chris Ward,

Thanks for getting back to me. I know that the assets must be saved on the device for offline use. The problem with downloading them to the downloads folder is that the user has access to all of the images, and if you delete the app all of the images are still on the device. My exported aia. file is 9,076KB with all of the images as assets. the image file bundles will be between 10.5MB and 20MB. For some reason the aia. file with the images as assets is smaller than the image bundles? I am doing several different variations of the app with the same functions but different images. It would be great if all of them were in the same app, but that would increase the size of the image bundles by several times. The aia. file without the assets in it is 41KB.
If I was to look into an AI offspring, which one do you think would be the best?

Nathan Wilson

unread,
Nov 27, 2018, 2:51:24 PM11/27/18
to MIT App Inventor Forum
Another idea that would work is to have it start as an online app using urls for the images, and then have an option to download for offline use. But I don't know a way to download the images other than to the downloads folder.

Taifun

unread,
Nov 27, 2018, 3:28:18 PM11/27/18
to MIT App Inventor Forum
But I don't know a way to download the images other than to the downloads folder.

set the ResponseFIleName property, see also the documentation http://ai2.appinventor.mit.edu/reference/components/connectivity.html#Web

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.        

Nathan Wilson

unread,
Nov 27, 2018, 8:11:07 PM11/27/18
to MIT App Inventor Forum
@Taifun

What would I set it at for downloading the images into the app, rather than the downloads folder, so that when the app is deleted the images are deleted as well? I thought it could not do that, but if you know a way I would love to hear it. :)
In your example (which I think you did a great job on by the way) you set the ResponseFileName to globalStrPath, which was /downloads/do-not-delete/webprefetch. Is there a way to use the ResponseFileName to download the images into the apps assets folder, and what would that look like? 

Taifun

unread,
Nov 27, 2018, 9:13:18 PM11/27/18
to MIT App Inventor Forum
the assets folder is read only and therefore you can't add or remove something to/from the assets during runtime of the app

Taifun

Nathan Wilson

unread,
Nov 27, 2018, 9:20:50 PM11/27/18
to MIT App Inventor Forum
Then what do I set the ResponseFileName property to in order to accomplish what I am trying to do?

Taifun

unread,
Nov 28, 2018, 8:07:39 AM11/28/18
to MIT App Inventor Forum
you can set the ResponseFileName to any directory or filename you like and download to any directory on the internal sdcard
Taifun

Nathan Wilson

unread,
Nov 28, 2018, 1:21:16 PM11/28/18
to MIT App Inventor Forum
Thank you Taifun for that clarification. But that still does not answer my question. It does not matter if the images are saved to the downloads folder or a different place on the sdcard or internal storage if it behaves the same way. If I can not download the images into the app, so that they are deleted when the app is deleted, then the ResponseFileName will not work for what I am trying to do.

Does anybody have any ideas or can this not be done with appinventor? Or any alternatives that could work for what I need to do, like I asked in my original post?

Taifun

unread,
Nov 28, 2018, 3:54:11 PM11/28/18
to MIT App Inventor Forum
the assets are read only for all Android apps no matter which development environment you are using
if you download some files to your device and later you delete the app, those files will remain on the device

Taifun

Nathan Wilson

unread,
Nov 28, 2018, 11:28:34 PM11/28/18
to MIT App Inventor Forum
Yes, that is the problem. I am searching for a solution.

Does anybody know if any of the commercial AI offspring don't have a 10MB limit, like what Chris Ward mentioned, and which ones? 

Evan Patton

unread,
Nov 29, 2018, 12:50:38 AM11/29/18
to MIT App Inventor Forum
You could upload your project to code.appinventor.mit.edu. It uses a different infrastructure that isn't bound by the 10 MB limit.

Regards,
Evan

BodyMindPower

unread,
Nov 29, 2018, 2:48:55 AM11/29/18
to MIT App Inventor Forum
As long as code.appinventor.mit.edu does not use compileSdkVersion / targetSdkVersion = 26,  my solution is that I remove some assets from the aia project and create (compile) the apk. Then I decompile the apk (AppToMarket or APK Studio / apktool) and add the missing assets again.

That's how I've created my apps with a size of 60 to 99 MB, with all the assets in the apk. When the app is uninstalled, there will be NO assets left on the device.

Anke

Nathan Wilson

unread,
Nov 29, 2018, 1:34:19 PM11/29/18
to MIT App Inventor Forum
Evan,
I have been using the code.appinventor.mit.edu server recently, but it does not currently have the build for google play option.

Anke,
Thanks, that is a great idea. I am somewhat new to this and I have not done anything like that before. Where would I get AppToMarket or APK Studio? Do you have a link for the one that you used? I did some web searches trying to find them, but there was a lot of different results and I am not sure which one I am supposed to download. Doing a google search for "App to market" brought up a bunch of stuff that did not have to do with decompiling an app. :)

Nathan Wilson

unread,
Nov 29, 2018, 1:52:25 PM11/29/18
to MIT App Inventor Forum
Since I have not done that before, is there a way I could get detailed instructions on how to use AppToMarket or APK Studio do decompile the app and add the assets and recompile it? Do you know of a good tutorial or YouTube video or something like that?

BodyMindPower

unread,
Nov 29, 2018, 3:51:37 PM11/29/18
to MIT App Inventor Forum
to use AppToMarket with targetSdkVersion="26" (Android 8, Build: App for Google Play)

Anke

Nathan Wilson

unread,
Nov 29, 2018, 4:35:05 PM11/29/18
to MIT App Inventor Forum
Thanks! Once I get this figured out it should solve my problem. I appreciate the help very much. I have been working on my app for several months now and am almost done, but then I ran into this 10MB limit problem and have not been able to find a solution that works for what I need until now.

I am still unsure how to use AppToMarket though. I went to the forum you linked to with Boban. He said that he "will publish the solution what will be needed to make it work on my page" but when I click on his link it has an error and says "Free web hosting has been closed." So that does not work. I downloaded AppToMarket and tried to run it, but all that happened is this window came up, what should I do? Is there another tutorial somewhere else?

Capture.PNG


Nathan Wilson

unread,
Nov 29, 2018, 4:36:51 PM11/29/18
to MIT App Inventor Forum
Sorry, that image did not show up very well on my screen. here is it again:
Capture-2.PNG

BodyMindPower

unread,
Nov 30, 2018, 1:56:21 AM11/30/18
to MIT App Inventor Forum

TimAI2

unread,
Nov 30, 2018, 3:21:44 AM11/30/18
to MIT App Inventor Forum
@BodyMindPower

Did I read correctly that this will only work for Legacy builds (not the Google Play API 26 builds) ?

I have found I can't rebuild an apk if using the Google Play build.....

BodyMindPower

unread,
Nov 30, 2018, 5:49:50 AM11/30/18
to MIT App Inventor Forum
Of course you can also rebuild an apk if using the Google Play build (targetSdkVersion = 26).
I did this probably more than 100 times.

Anke

TimAI2

unread,
Nov 30, 2018, 5:56:07 AM11/30/18
to MIT App Inventor Forum
Might need to update my apktool ;)

BodyMindPower

unread,
Nov 30, 2018, 6:01:37 AM11/30/18
to MIT App Inventor Forum
Yes, use apktool.jar (ver 2.3.3 or 2.3.4).
Reply all
Reply to author
Forward
0 new messages