On 11/21/2012 03:20 PM, Piren wrote:
Indeed, one of android's strong advantages (to the consumer) is also a big disadvantage (to the developer).
That's exactly what I write down in my Google+ profile this weekend, so I fuuullyyyyyy aaaagreeeee with that. ;-)
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.
I did it manually to reduce heap consumption peaks. You know: sometimes I need to load different bitmaps for a given screen, but even when the object of the previous screen has been already dereferenced, the bitmaps it uses has not yet been collected, so by a second I will have bitmaps for both screens on the memory. I have noticed that if I recycle the bitmaps of the first screen before switching, when I load those needed for the second screen the old ones have yet been recycled, thus my heap use peak is a lot of lower.

Of course you should be careful on not using recycled bitmaps and things like that, but my code is pretty clear and I am not experiencing this kind of crashes at all, so there is no point worrying about... we have enough to be concerned with actual bugs to think about potential ones... ;-)
When it comes to testing, you can always just use your more knowledgeable customers as QA.
I have no doubt that if you develop apps like developers tools or so this could be very useful, but I do casual games and most of my users does not even fill crash reports, and the few ones whose do put things so descriptive as "it is not working", and others simply comply on comments rating the game with one star and swearing about my mum or so...
Start a beta program with a bunch of users (or friends :) ) that will test your app in advance.
That's a great idea that I have had in mind before, but discarded due as typical nerd I have not many friends... X-D

But perhaps I could think about any incentive. I will have it in account...
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.
Well, it is true that they have great limitations, not only for not having the hardware, also because some manufactures make their own customized Android versions. But they are still useful for testing and detecting obvious bugs.

Hope there were a "renting mobile" service on my town or something similar...

Best regards,

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

Reply via email to