Tip of the Day: largeHeap=”true”

If your app is done in API 11 or higher, in the < application /> in the Android Manifest.xml, you can use largeHeap=”true” which will allow the application to use more heap if it is available.

Bigger heap though isn’t necessary good because now your app will spend more time during garbage collection. Users will complain that their other apps are being kicked out of memory.

Heap Size limits
– G1: 16MB
– Droid: 24MB
– Nexus One: 32MB
– Xoom: 48MB

Source: Google I/O 2011: Memory management for Android Apps


Google+ Comments

About the author

Mark Lapasa

Mark Lapasa is a mobile developer who has released Native Android apps for both phones and tablets. He collaborates with business analysts, development and design teams to deliver engaging user experiences at the client-tier. He has many years of experience developing user interfaces for Enterprise Mobile, Healthcare, Financial, Social Gaming, and Online Gambling sectors. He blogs at http://knowledge.lapasa.net