// From http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64Bits
unsigned char b; // reverse this byte
b = ((b * 0x80200802ULL) & 0x0884422110ULL) * 0x0101010101ULL >> 32;

March 4, 2010

An experiment with Android

Filed under: Uncategorized — jon @ 8:33 pm

I recently got a new phone: The HTC Hero (AKA G2 Touch because T-Mobile feel like confusing everyone). Overall I’m pretty happy with it, though there are some big niggles. It still works better as “smart” than it does as a “phone” in that the worst feature is probably the dialling interface / contact list, but it’s a vast improvement over my last phone (Nokia’s N95) which offered some amazing features at the expense of usability.

It’s probably in no small part down to its open source foundations that I like it so much. At least I can change the things I don’t like by installing replacement apps or writing my own. I was particularly impressed at how well the architecture lends itself to replacing things like the on screen keyboard.

So I had a browse on the app store market place and downloaded a few apps, a few games and a couple of utilities. A few things struck me:

  • The sheer number of apps considering the age of Android as a platform. Even some really niche markets were saturated with a large number of almost identical apps.
  • The ratio of free to paid apps is high. Should commercial developers be thinking “iPhone”?
  • The existence of plenty of very small but very cheap apps.

That last point is interesting. There were a lot of apps I would have expected either to be free, or to have been more expensive but have more features. I got wondering how many people actually download these apps; whether you could really make money from selling these tiny apps at less than £1 a pop. Bizzarly, Google clearly don’t want anyone outside the android world to have any contact with the Market, as the website is atrocious. You can’t see the price of apps, can’t download the free apps, can’t do much at all. There are of course other sites (eg androlib.com) which try to rectify this. What I really want is a download count.

This all inspired a question: What sort of market is there for these small sub £1 apps? Well there’s only one way to find out so I downloaded the android SDK and Eclipse plugin and started reading the dev guide…

First impressions: Eclipse integration is really nice (although the device manager was a bit confusing at first), but boy is the emulator slow. Still, it was enough for me to try out a couple of Hello World programs and see what the dev guide was talking about. The documentation is actually way above par if you take the time to read the guides before the examples or reference. It isn’t very well structured, but the content’s great.

I spent a couple of days idly considering what I might write. I thought about a really simple reference app, but I felt it would be too small and there was too much free and paid competition. I wondered about trying to use some of the features unique to the smart phone environment – like GPS – but I didn’t want anything involving too many APIs for the first app at least.

So what did I decide on? A resistor colour code calculator.

I’ll explain why and the project goals in the next post, and I’ll update progress as I go. I hope it might prove useful to other developers wanting to bootstrap their Android development.

:wq

« Previous Page