I am creating a small Android app.
It is vital that all the images that are used as Bitmap resources are all loaded into memory at once so they can be drawn on the screen at any given time.
The grand total of all the images as they appear on my hard disk is just a hair over 19MB - that's not a lot, however attempting to load them all into the memory in primary Load methods will always throw me the OutOfMemory exception.
I have read that setting android:largeHeap = "true"
in the package's manifest file can help with the problem, however since I am using dot42 as my development framework and environment, I am having trouble setting it.
Here appears to be a sort of quick manifest guide, http://docs.dot42.com/manifest But I'm having trouble making much sense of it, as it's obviously aimed at people very highly knowledgeable of both platforms, to improvise a solution.
So quick question, how can I set such a property in Dot42?
Also, why are the memory constraints in an application so strict? Official documentation lists that a single 16MB photo will often exceed memory limits, that makes zero sense.
How would one work around that in an app that must display large amounts of memory-intensive content, like photoalbums or camera recording applications? I've seen and played multi-gigabyte 3D action games that SURELY must have more than two dozen megabytes of memory allocated at any given time, so how are they allowed to allocate that much?
As of 1.0.1.80 the manifest resource item template has been introduced. This allows you to include a traditional AndroidManifest.xml in your dot42 project. This should allow you to use the mentioned setting.