.apk file too big for no obvious reason

Hello everyone,

I have to say that you are doing a great job here and many of my questions have been answered already by reading this forum. I am new to all this.

As i was exploring corona i created a simple app. I have 8 buttons, no background, nothing at all. The buttons are just circles i created with code, so i have no pictures at all. Just code.

I noticed though that my app was too big. 4 mb when created and 8 mb when installed on android phone.

I opened the .apk file with a zip editor and i noticed that the coronalib file alone was 1.8mb.

Why is the app so big?

By looking at the google play store i see that most apps are between 1-2 mbs.

Since i created this topic, i will ask here in case someone knows or has the same issue as i am.

The buttons i created open another application of the phone, such as e-mail client, sms etc etc.

The problem i encounter is that when i push the button it opens the same thing 3-4 times (e.g opens 3 times the gmail to send e-mails). What triggers that? Note that on the listener i have used the touch and not tap (in case it matters).

I have created few apps in the past and used them on the same mobile and have not faced such issues before…

Hi @alexander1756,

The type of input listener (touch vs. tap) definitely matters. Touch events report a vast amount of responses, including the beginning, every “moved” response, and the ending too (user lifts the finger off). These events are managed by the “phase” in Corona, and you have to use conditional logic to pinpoint the exact phase you need: “began”, “moved”, or “ended”.

This guide should help explain it better:

http://docs.coronalabs.com/guide/events/detectEvents/index.html

Brent

I have tottaly forgot about that.

Thank you for your answer.

About my first question i see that another guy was wondering too (http://forums.coronalabs.com/topic/38001-my-application-app-in-android-is-too-big/).

From your answer what i get is that corona pretty much builds every .apk with the same pattern so it adds all kind of stuff like social media icons, libraries etc etc no matter if the source code actually uses them or not.

Is there a way to exclude libraries we don’t need?

Personally what i did was to open the .apk with a zip  editor and delete manually the unnecessary stuff like the contents of “res” file.

The core Corona binary and globally loaded libraries are going to be a little under the 2MB range, perhaps a bit less.  The more modules you require, the more that’s going to grow.  A 2MB app is tiny.  A single  high-res background image will easily eat up that much space. 

Since i created this topic, i will ask here in case someone knows or has the same issue as i am.

The buttons i created open another application of the phone, such as e-mail client, sms etc etc.

The problem i encounter is that when i push the button it opens the same thing 3-4 times (e.g opens 3 times the gmail to send e-mails). What triggers that? Note that on the listener i have used the touch and not tap (in case it matters).

I have created few apps in the past and used them on the same mobile and have not faced such issues before…

Hi @alexander1756,

The type of input listener (touch vs. tap) definitely matters. Touch events report a vast amount of responses, including the beginning, every “moved” response, and the ending too (user lifts the finger off). These events are managed by the “phase” in Corona, and you have to use conditional logic to pinpoint the exact phase you need: “began”, “moved”, or “ended”.

This guide should help explain it better:

http://docs.coronalabs.com/guide/events/detectEvents/index.html

Brent

I have tottaly forgot about that.

Thank you for your answer.

About my first question i see that another guy was wondering too (http://forums.coronalabs.com/topic/38001-my-application-app-in-android-is-too-big/).

From your answer what i get is that corona pretty much builds every .apk with the same pattern so it adds all kind of stuff like social media icons, libraries etc etc no matter if the source code actually uses them or not.

Is there a way to exclude libraries we don’t need?

Personally what i did was to open the .apk with a zip  editor and delete manually the unnecessary stuff like the contents of “res” file.

The core Corona binary and globally loaded libraries are going to be a little under the 2MB range, perhaps a bit less.  The more modules you require, the more that’s going to grow.  A 2MB app is tiny.  A single  high-res background image will easily eat up that much space.