App install size the same on different device types
Asked Answered
P

2

6

When I install my app on my main/new phone, the installed size is around 18.5MB and when I install my app on an old Samsung Galaxy Ace (Mk1), for some reason, it installs with pretty much the same size, as you see here:

enter image description here

It runs perfectly on my main phone, but obviously, the old Galaxy Ace really struggles with it.

Now, I download a random game from the Play Store and with that one you can see the results here:

enter image description here

Much better, it takes up less space on the less capable phone than it does on the more capable phone.

However, my question is, where can I start to try to figure out why my app doesn't exhibit this desired behaviour?

Information about my project

I have provided 4 sets of Graphics within my project and they are:

Graphics

  • XHDPI: Total of 3.73MB
  • HDPI: Total of 2.87MB
  • MDPI: Total of 1.33MB
  • LDPI: Total of 1.03MB

Sound

  • OGG Sound Files: 202KB
  • MP3 Soundtrack: 5.6MB

The (Unsigned and signed) APK file is about 16.02MB

Apart from that there is a classes.dex file within the APK which is about 3.5MB.

In Eclipse, I link BaseGameUtils and Google-play-service-lib jar files.

I know that my game is slightly more resource hungry than the other game I downloaded - but that isn't the point of this question. I need to make sure that the size of the installed app is smaller on lesser capable phones than it is 'better' ones but as you can see, mine is exactly the same.

Any help would be appreciated.

Edit

Additional information if it helps:

The Samsung Galaxy Ace is running Android 2.3.4 Gingerbread

The other phone is running Android 4.4.2 Kit Kat

Profligate answered 16/9, 2015 at 13:11 Comment(2)
Have you enabled proguard on your app?Varicocele
Yes @georgerappell Proguard is enabled and working. The problem isn't that the exported/signed APK isn't reduced in size - because it is, the problem is that the install footprint is the same on these 2 devices whereas every other app I've installed has a significantly reduced install footprint on the Galaxy Ace - thanks!Profligate
A
6

the answer is the picture.. you see android apps can specify locations where apps are supposed to be installed, whether internal or external- you can do that in your android manifest file

android:installLocation="auto"

Looking at your app you from the settings screenshot you have not specified that element in your manifest hence the "move_to_sdCard button" is inactive. Your apps installs in internal memory

coming to the other app, looking at the screenshot you will see that the "move_to_phone button" is active because they specified that feature hence since there wasn't enough space on your device it automatically installed your app on the internal-external memory or strictly external memory.. But when that feature is set not all resources or files are installed on the internal-external memory they are shared, so the size gets trimmed in the process hence that ouput.

Speaking about the lag of your app, you need to digg into your codes pretty much. also newer apis contain functions the old ones do not have, hence you need to re-evaluate the kinds of codes you choose..

Hope i am lucid enough

Ambroseambrosi answered 24/9, 2015 at 18:25 Comment(1)
Brilliant - this was the correct answer! - I put this into my manifest and now my app is only registering as taking up 6.87MB and not 18.49 as show in the screenshot above. Cheers!Profligate
G
1

Probably the "Other App" is using the Multiple APK technique to publish the App on the Play Store. With this feature you can build and deploy several apk(s) each targeting a specific device density screen. In this way you can reduce the apk dimension since each apk will have only the resources for his target and automatically the Play Store will deliver the correct one.

Gussiegussman answered 16/9, 2015 at 13:23 Comment(6)
I don't think that is it @Pollizzio, when I look at the APK size on the Play Store for this other app, it reports the same size on both devices., also, and this probably more telling, I downloaded the APK of the app I used to test this, and installed it manually on my 2 devices, same APK, completely different install footprints, so I'm guessing there is some step I'm missing somewhereProfligate
Unfortunately I doubt that's it either @Polizzio, expansion files are for .APK files that are > 50MB as far as I'm aware. The APK's we're taking about are nowhere near that so would have no reason to use expansion files, plus they don't download anything after you run them and it still wouldn't explain why the initial install footprint is different. Thanks anyway :-)Profligate
"same APK, completely different install footprints" - you mean the apks were identical, or had identical size?Delmydeloach
The system could be using different ways to calculate the size of the APK. For example, the old device might not consider the size of dalvik-cache while the newer phone does. Check the sizes using adb shell to make sure.Rumble
@stkent, same APK copied onto 2 devices and installed.Profligate
@JaredRummler, thanks, I will look into this, however do you have any idea why my app would be different to every other app that I've tested? It's really odd - (ie, I've installed a few apps now on both phones and the ones installed on the Ace always takes up significantly less space.Profligate

© 2022 - 2024 — McMap. All rights reserved.