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
This returns max heap size in bytes:
Runtime.getRuntime().maxMemory()
I was using ActivityManager.getMemoryClass() but on CyanogenMod 7 (I didn't test it elsewhere) it returns wrong value if the user sets heap size manually.