Paritosh Anand
Paritosh Anand

Reputation: 95

Android Development : How do I reduce app size?

My app shows different large sized images in WebView that are actually time-tables. JPGs are creating too much space. How can I reduce the app size considerably?

Upvotes: 1

Views: 1687

Answers (4)

Calvin
Calvin

Reputation: 3312

In addition to imrankhan answer, i have following suggestion:

(1) Avoid unnecessary resource qualifiers and use alias resource if it can't be avoided. http://developer.android.com/guide/topics/resources/providing-resources.html#AliasResources

It will map to only 1 physical file instead of same files in each target resource folders.

E.g. drawables -> real file drawable-ldpi -> alias of the real file

(2) Let your App install on SD Card instead of internal memory if you really can't reduce file size more. http://developer.android.com/guide/appendix/install-location.html

Upvotes: 1

ρяσѕρєя K
ρяσѕρєя K

Reputation: 132972

Interesting blog post from SonyEricsson on how to reduce the size of your App. Some of the tips outlined in the post are

ProGuard – Open source tool for shrinking code, word of wisdom says: make sure you test your app properly after you shrink it.

Debug symbols removal – Remove debugging symbols for native (.so) files

Media formats – PNG or JPEG for image, AAC for Audio, H264 AVC for video

Unused resources – Removed all unused resources that you are not going to use in your app

Upvotes: 4

CaseyB
CaseyB

Reputation: 25058

An apk is just a zip file. The only way to reduce it's size is to reduce the size of the stuff in it. I'd try different formats and compressions for the images and see what works best. Alternately, you could just use the data from the timetables and build the display programmatically.

Upvotes: 2

Sparky
Sparky

Reputation: 8477

Put your JPGs on the web and only load them onto the phone if necessary -- and save them into external storage. At the size that they will be displayed on-screen, no larger.

Upvotes: 0

Related Questions