lördag 7 april 2012

GAE as Android Test Portal, part 1

TestFlight http://testflightapp.com/ is one thing I envy my fellow iOS developers. So far I have not found a good enough alternative for my needs: both Native and HTML based apps. So I thought, why not develop one myself? Hosted at Google App Engine? That is a also a motivator for exploring the GAE land, something that I have on my fun-things-to-do-list for a while.

Here is the first part, super basic. Just to get the environment in place.


onsdag 14 mars 2012

ImageMagic to rescue

If you are a Android developer, and working with an app that uses png’s (or other images) you may recognize this:

OutOfMemory Exception

It is no game. My app (Zappa, a remote control for a settop-box) uses a lot of images - the channel icons. There are hundreds. And they change every now and then. And sometimes one (or two) of a batch of new png’s is too large; 512x512 instead of 88x88. You can’t tell from the file size in the file system.

It is here ImageMagic comes to rescue http://www.imagemagick.org. Really easy to install and use (I use a Mac and MacPort):

$ port install ImageMagick
$ … (omitted a lot of stuff)


then, in the res/drawable folder

$ identify ch_*.png
$ ch_10.png[1] PNG 88x88 88x88+0+0 8-bit DirectClass 7.65KB 0.000u 0:00.000
$ ch_100.png[2] PNG 512x512 512x512+0+0 8-bit DirectClass 8.62KB 0.000u 0:00.000
$ ...
$ identify ch_*.png | grep 512x512 | awk 'FS="[" {print $1}

Voila!  The guilty png's are listed.