0

Hi this question was asked a while ago, I'm wondering if the situation has changed.

Is there a comprehensive list of (or any way to find out) the size of heap for various Android devices.

I understand they range from 16mg to 48mg+. If you can't tell in advance is there anyway to tell from the market, so that your app is only available to be downloaded by devices with a sufficient size heap.

The reason I ask is that I'm writing a game which is "graphics heavy". This means that there is scope to easily create different versions of the game with different memory requirements. But of course you need to be able to organise your versions so that they are available to the correct devices.

user922220
  • 921
  • 2
  • 7
  • 7
  • do you really intend to load more than 16 megs of graphics onto the screen at ONE time? If not, then the heap total is not going to matter. – Yevgeny Simkin Feb 27 '12 at 18:48
  • I'd really like to. I've got a lot of animation that needs to be available to the main character. I can easily do different versions of the graphics to fit different devices, but I'd like to know what the heap size is, preferably before they download, so I can get the user to download a version of the game suitable for their device. – user922220 Feb 27 '12 at 22:03

1 Answers1

0

Maybe this can be done with a small test program calling

Runtime.getRuntime().totalMemory();

that call is supposed to return the Java heap size as a long

Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158