question

prabhu006 avatar image
prabhu006 asked

Memory Issues in Kindle Fire HD

I am developing an application that uses high resolution images. I tested on Kindle Fire and things seems to be fine but on Kindle Fire HD (7 inch) it is throwing Out Of Memory very frequently. I checked the RAM and Heap size and both seems to be same in these devices. Version of devices -------------------------- Kindle Fire - [b]10.2.4_user_2420720[/b] Kindle Fire HD - [b]7.2.3_user_2330720 [/b]
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi Prabhu, We need few more details specific to your app. Can you please submit a contact us to Amazon support team. One of our support engineer will assist you further. Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

xiledsystems avatar image
xiledsystems answered
You'll have to put android:largeHeap="true" in your node in the AndroidManifest.xml. Without it, the heap size is 48MB, with it, it goes up to 256MB. EDIT: The original Kindle Fire ignores this, and always gives 64MB. Ryan Message was edited by: xiledsystems
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

prabhu006 avatar image
prabhu006 answered
Hi, Thanks! Now with largeHeap i am getting 256 MB heap. But will using largeHeap result in performance degrade!?
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dixith@Amazon avatar image
Dixith@Amazon answered
Hi Prabhu, If your App is developed using API 11 or higher, you can use largeheap="true" attribute inside your application tag, which will allow the application to use more heap if it is available. As per android documentation, enabling this also does not guarantee a fixed increase in available memory, because some devices are constrained by their total available memory. If you are using extra heap space by using largeheap="true" , your app will spend more time during garbage collection. Sometimes this will impact other apps are being kicked out of memory. In logcat, you can analyze your app behavior by looking at the number of GC calls and the paused time during garbage collection.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

prabhu006 avatar image
prabhu006 answered
Thanks a lot for your reply!
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.