How do you programmatically detect the application heap size available to an Android app?
I heard there\'s a function that does this in later versions of the SDK. In
Asus Nexus 7 (2013) 32Gig: getMemoryClass()=192 maxMemory()=201326592
I made the mistake of prototyping my game on the Nexus 7, and then discovering it ran out of memory almost immediately on my wife's generic 4.04 tablet (memoryclass 48, maxmemory 50331648)
I'll need to restructure my project to load fewer resources when I determine memoryclass is low.
Is there a way in Java to see the current heap size? (I can see it clearly in the logCat when debugging, but I'd like a way to see it in code to adapt, like if currentheap>(maxmemory/2) unload high quality bitmaps load low quality