How to Shrink App Size?

I’ve been using Corona for some time, but I’m getting complaints that my apps are too big.  For a small game I’ve built, the APK is about 8.5 MB.  But when it installs, it eats up 15 MB.  I’m seeing other apps in the play store that are much smaller (but I don’t know if they use Corona or not).  Is there (or not) ways to make Corona slimmer.  To complicate things, I am also using admob ads.

I’ve reviewed notes about compressing the APK and follow them.  That helped by shrinking the APK to about 6 MB, but then I had reports of the APK not being compatible on certain devices, so went back to the uncompressed APK.

All suggestions are welcome.

Thanks in advance.

There really isn’t much that can be done about making Corona SDK apps smaller on Android.  We have to include enough features in the core to make the product usable and that increases the size of a minimal app.

Rob

Rob,

When you say the core - What does that mean?

Now i understand that general things needed to make an app work is probably part of it.

Perhaps i am wrong ( and it is very likely - i am certainly no expert) - i assumed that the various API’s are of a module style and perhaps the corona core includes all of those modules - and thus each modules small size adds to the “corona core” size - a 1+1 = 2 but when you have 100 1’s that becomes 100 -> kind of situation!

I am just learning about modules and trying to put them into my code as a way of segmenting my code - just like your score module does - separates the scoring system code to it’s own area. But if your app does not require the score you could leave that module out correct?

I realise that this kind of solution can and probably would cause lots of problems for newbies (myself included) if used without careful thought and would probably need a “use at own risk” kind of thing otherwise there would be an incredible amount of “help - my app doesn’t work”.

The disclaimer - i would like to point out i used the word “assume” - and acknowledge the danger that the word includes - i don’t think U are in danger just ME(given my lack of coding knowledge).

T.

Here’s some info on programs that can shrink your image sizes. However, be aware that even the barest of apps built with Corona will be approximately 7 mgs, because the “core” module functionality (physics, Composer, audio APIs) are included whether you use them or not. 

Corona SDK is made up of some code needed to process the Lua files and all of the various API calls.  We have to include Lua and all of it’s default libraries.  We have to include the OpenGL code, audio code, database code, networking code, etc. that makes an app work.

This is the core and because we have to include features like SQLite in Android builds that  Apple provides for free, the core is around 8mb. 

Your Lua code doesn’t add up to a lot of code.  What adds up is images and audio.  So there will be a minimum size, modules like the score module doesn’t add much.

Rob

Thanks for your time making this clear.  I guess this just comes with the territory.

But maybe a different question can also follow on to this.  Does anyone know why an 8 MB .apk leads to a 15 MB reported install size?  Could that be from ads?

Out of interest when you build an app, do you actually throw out the libraries that aren’t used. So if you don’t use the database or networking it isn’t included ?

If not, could this be added to build.settings rather like that thing to exclude files from the build ? 

@stock10 I can’t say for certain, but I know that we have to extract some files out of the APK so that we can load them.

@paulscottrobson I don’t think it’s practical for us to build conditionally like that.

Rob

There really isn’t much that can be done about making Corona SDK apps smaller on Android.  We have to include enough features in the core to make the product usable and that increases the size of a minimal app.

Rob

Rob,

When you say the core - What does that mean?

Now i understand that general things needed to make an app work is probably part of it.

Perhaps i am wrong ( and it is very likely - i am certainly no expert) - i assumed that the various API’s are of a module style and perhaps the corona core includes all of those modules - and thus each modules small size adds to the “corona core” size - a 1+1 = 2 but when you have 100 1’s that becomes 100 -> kind of situation!

I am just learning about modules and trying to put them into my code as a way of segmenting my code - just like your score module does - separates the scoring system code to it’s own area. But if your app does not require the score you could leave that module out correct?

I realise that this kind of solution can and probably would cause lots of problems for newbies (myself included) if used without careful thought and would probably need a “use at own risk” kind of thing otherwise there would be an incredible amount of “help - my app doesn’t work”.

The disclaimer - i would like to point out i used the word “assume” - and acknowledge the danger that the word includes - i don’t think U are in danger just ME(given my lack of coding knowledge).

T.

Here’s some info on programs that can shrink your image sizes. However, be aware that even the barest of apps built with Corona will be approximately 7 mgs, because the “core” module functionality (physics, Composer, audio APIs) are included whether you use them or not. 

Corona SDK is made up of some code needed to process the Lua files and all of the various API calls.  We have to include Lua and all of it’s default libraries.  We have to include the OpenGL code, audio code, database code, networking code, etc. that makes an app work.

This is the core and because we have to include features like SQLite in Android builds that  Apple provides for free, the core is around 8mb. 

Your Lua code doesn’t add up to a lot of code.  What adds up is images and audio.  So there will be a minimum size, modules like the score module doesn’t add much.

Rob

Thanks for your time making this clear.  I guess this just comes with the territory.

But maybe a different question can also follow on to this.  Does anyone know why an 8 MB .apk leads to a 15 MB reported install size?  Could that be from ads?

Out of interest when you build an app, do you actually throw out the libraries that aren’t used. So if you don’t use the database or networking it isn’t included ?

If not, could this be added to build.settings rather like that thing to exclude files from the build ? 

@stock10 I can’t say for certain, but I know that we have to extract some files out of the APK so that we can load them.

@paulscottrobson I don’t think it’s practical for us to build conditionally like that.

Rob