Indeed, one of android's strong advantages (to the consumer) is also a big 
disadvantage (to the developer).
I was faced with similar heap issues, did the same thing as you did, mostly 
came to the conclusion that the best thing is just to drop the bitmaps 
altogether or reduce their resolutions as much as possible. 
You should watch out with Recycling manually as this might cause issues in 
some instances (like when the bitmap is used in a listview), i found that 
just nulling the drawable Callback and making the bitmap Purgable was 
sufficient for GC to work correctly and avoid OutOfMemory exceptions.

When it comes to testing, you can always just use your more knowledgeable 
customers as QA. Start a beta program with a bunch of users (or friends :) 
) that will test your app in advance.  You'll be able to reach a wider 
variety of devices and catch those big issues early on before releasing the 
app to the public.

Emulators by the way, wont do the job as they dont emulate the different 
hardware specifications of each device. 




On Wednesday, November 21, 2012 3:23:06 PM UTC+2, Fran wrote:
>
> Hi,
>
> This is one of the worst things of Android development ever. I am facing 
> similar problems, also most of them with SGSIII, getting OOM crashes with 
> no apparent reason. I have run the app in several different actual devices, 
> also different emulator instances, one of them trying to fit as closed as 
> possible the SGSIII settings. I have reduced heap consumption to the 
> minimal, but I am still getting these annoying errors.
>
> Now I am considering to buy an SGSIII actual device to test it, but this 
> is not an option in most of the cases, and it is not clear if this will 
> solve this problem -may be only some SGSIII are affected, and the one I 
> bought is not one of them-.
>
> I released a new version of my app last Friday with disastrous results due 
> to this problem -thousands of uninstalls-. I have did my best since them 
> improving a lot memory use, writting code for actively recycle bitmaps when 
> they are not needed and thinks like that, with excellent results (in an 
> emulator instance with same resolution, density and VM heap budget than 
> SGS3, I got now a 40% less of peak memory consumption than before). And it 
> is really frustrating to see that crashes continues after all that effort.
>
> We need "something" to fight these problems.
>
> Bests,
>
>
> 2012/11/21 Mike Adams <adam...@gmail.com <javascript:>>
>
>> Hi,
>>
>> I have a kind of chat and game client, it connects to a board game server 
>> and is a tabbed android app.  There is a telnet thread and it feeds 
>> through concurrently linked queues 3 worker threads that update a game 
>> board, a text console and i have a lists tab.
>>
>> The problem is i've had 2 users now complain that the program has crashed 
>> on them, one said it froze his phone. I can't be clear if the program 
>> crashed or if its something with their phones, one was a samsung s3 i think 
>> the other some kind of acer tablet if i recall.  But how would i evaluate 
>> this? It's never crashed for me on my tablet or phone.  What kind of things 
>> could cause a crash like this but only intermittent or on certain devices 
>> which could have to do with the resources available on the devices and mix 
>> of what is happening on that device. One user says he always hard stops it 
>> before running it but it still crashed on him which kind of dismisses its a 
>> state issue with it being up to long.
>>  
>> Mike
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to