I am writing an Android application which uses several 3D models. Such a model with textures can take up a lot of memory. I found out the manufacturer sets a limit on the he
Is there a way to increase this size of memory an application can use?
Applications running on API Level 11+ can have android:largeHeap="true"
on the <application>
element in the manifest to request a larger-than-normal heap size, and getLargeMemoryClass()
on ActivityManager
will tell you how big that heap is. However:
This only works on API Level 11+ (i.e., Honeycomb and beyond)
There is no guarantee how large the large heap will be
The user will perceive your large-heap request, because it will force their other apps out of RAM terminate other apps' processes to free up system RAM for use by your large heap
Because of #3, and the fact that I expect that android:largeHeap
will be abused, support for this may be abandoned in the future, or the user may be warned about this at install time (e.g., you will need to request a special permission for it)
Presently, this feature is lightly documented