Wednesday, December 10, 2008

First steps w/ Android!

Again an unusual post - am aiming to be unashamedly technical this time!

Our shiny new G1 arrived yesterday - now down to me to make something work on it! Lots of other folks have reviewed the device from a user perspective, generally coming to the conclusion that it is a great OS somewhat let down by the HTC hardware. Won't disagree with that view, but my focus here is going to be on app development for the beast.

Guess I am showing my age and deteriorating eyesight but I hate devices whose manuals only come on CD - always prefer paper given the choice. Once the manual painstakingly copied onto my PC desktop turned out to be the usual sort of standard - i.e. doesn't tell you much past the basics.

First challenge is simply to get the pathway worked out such that an app I create in eclipse over onto the G1 and fire it up.

Setting up the development environment under winxp is very smooth:
  1. Download the current (v1.0 r2) Android SDK and unpack in some sensible folder.
  2. Add to your list of eclipse plugin download sites and install everything you find there.
  3. Restart eclipse and in the new Android properties section stick in the path to the SDK directory.
  4. Extend your system path variable to include the SDK's tools directory.
There are various example apps in the SDK itself and some app creation walkthroughs in the online documentation so plenty to get started with. You need to set the debuggable flag in the manifest to allow debugging later on. Once you have an app built you can run it in the emulator and then use the apk generated into the bin subdirectory of the project to upload it onto the device.

To connect the shiny new phone to the PC so the debugger can see it you need to:
  1. On the phone go into settings-->applications-->development and switch on USB debugging.
  2. Connect the phone and when it screams about the missing driver point it towards the usb_driver subdir in the SDK folder.
  3. (Re)start eclipse and the phone should appear in the DDMS perspective.
We also need to setup the phone to allow apps to be installed directly - this is disabled by default - setting under settings-->applications. Now finally we can push our app onto the phone using adb - the Android Debug Bridge with something like:
> adb install HelloAndroid.apk

And there we are:
This was captured with the very developer friendly screenshot capture utility which is provided as part of the DDMS perspective for any attached device.

The app will now have appeared in the DDMS perspective allowing heap and thread viewing etc, and you can then simply fire up the debug perspective and set breakpoints etc - all very smooth - works well.

UPDATE: Of course you can skip the adb bit and transfer and run the app in a single step from and Android style eclipse run/debug launch configuration!

PS. Credits - much of this process was picked up from here and here.
PPS. The latest carnival is up over at Mobscure - and my previous post on the Scottish Software Awards gets a mention.

Monday, December 01, 2008

A fun night at the awards!

Unusually for this blog, which is usually more about things in the wider industry, am unashamedly going to concentrate on our own success today. I hope you will allow me this indulgence!

For those who don't know exactly what Mobile Acuity is all about (and yes we really must update the website sometime soon) the core thing we provide is a mechanism to allow users to interact with a mobile service by taking pictures with their phone, generally as part of brand marketing campaigns. Specifics vary between campaigns but we can then do things like:
  • recognise what the picture is of - e.g. specific promo materials etc. User friendly linkage between print and mobile media.
  • recognise which particular part of the target the user has "pointed" their phone at - image zoning.
  • recognise/extract the colours in the image - colour id.
  • extract parts of the image and rework into media (e.g. video) to return to the user - virtual bluescreen.
Each of these can then drive mobile service activity as appropriate for the campaign.

While Mobile Acuity's technologies and services have underpinned projects which have won a number of awards so far this year, and we have even been allowed to talk about some of them publicly like Vodafone "Shoot and Score" which was succinctly summarised by techgutter, Friday night was the first awards we have contested in our own right since I have joined the company. The project we based our entry on was also the first I worked on after joining the company.

The awards in question were the Scottish Software Awards, an annual bash celebrating the best of the industry in Scotland, held in the Radisson SAS Hotel in Glasgow. Usefull and interesting group of people to chat to over drinks beforehand, and then through to the awards.

Was great to see so many companies shortlisted in the wireless / mobile category - good sign for the health of the sector in Scotland! Other than ourselves the shortlist consisted of:
We were delighted to win the category, with our friends over at Rapid Mobile and Mobiqa being runners-up. Left us sufficiently fortified to survive the last train back to Edinburgh on a Friday night which is always an interesting experience!

Update: A good summary with a bit of a twist in the tail over at Fasterfuture with Richard Marshall as guest contributor.

PS. The latest carnival is up over at All About iPhone - though by Steve Litchfield rather than Matt Radford!