Sunday, October 10, 2010

Android - Elf Shake App Challenge

We created this for the Androids in Auckland group as a training exercise to allow everyone to modify it how they feel fit and present their ideas along with any issues they have had in the December 2010 meet-up. Everyone can also see what it is like to post their application to the Android market. The winner will get a Free Motorola Flipout from Telecom NZ ( http://bit.ly/bE6V3H ) worth $599.

Remember that Due date: 2nd December 2010 at the Androids in Auckland meet-up.

Currently the Elf Shake application loads a Xmas tree background and has a single elf that falls when the phone is shaken (as seen to the right).

The General Rules:
  1. Your application must contain an image of an Elf
  2. The Elf must do something when someone shakes the phone
For a full list of the rules see http://www.meetup.com/Androids-In-Auckland/messages/boards/thread/9886387/0#38497020

This code as available as the basis to create your own fun application. Feel free to change any images, settings, code, anything – It’s your app!!! Source code including the Entire Eclipse project is available from this link (let me know if you want it uploaded as an SNV project).
All you need is to have a working Eclipse with the Android SDK installed (How to guide is here ).

To import the project into Eclipse:
  1. Download the file (ElfShakeApp.zip) from http://code.google.com/p/elfshake/downloads/list
  2. Go to File > Import...
  3. Select General > Existing projects into workspace
  4. Select the "Archive File" option, and enter the location of ElfShakeApp.zip
  5. Click Finish
You should now have the application in Eclipse that you can modify to your hearts content (See the Rules above).

What does this app do currently?

The main activity is nz.co.elfshakeappchallenge.ElfShakeActivity. This Activity picks up a shake of the phone and starts the Elf falling.


Under the ‘res’ folder there are:

- ‘drawable-*dpi’ - the standard drawable folders for a high, medium and low quality image – currently a elf and a tree.

- ‘anim’ – the animation descriptor for how the elf falls

- ‘layout’ – a single default layout with a background image and an ImageView of the elf.

- ‘values’ – the all important string / text that gets used in the application.


We’ve implemented a quick hack so you can test the falling elf on the emulator – just click the screen (onTouchEvent() which calls testShake() ) – you could remove these methods if you don’t want this functionality.


The one thing that I would suggest would be changing the package name - currently it is nz.co.elfshakeappchallenge so you may like to make it more relevant to you.

Please let me know via comment if you have any issues / suggestions for this basic application.

I am currently trying to get hold of a prize for the winner - I'll post it on the meetup site, if get any. - But the "winner" will be the person who made the app do the most but still remain functional and adheres to the rules above. Simon B, Julius and myself will be the judges!

[edit] Telecom NZ have given us a Motorola Flipout running Android 2.1 to give away as a prize - Thanks heaps Telecom!!! (phone details: http://bit.ly/bE6V3H) . Why not get your application started now!!!

Kind Regards,
Simon Collings

Solutions Manager

3 comments:

Mary said...

How do you feel about the latest sony-ericsson android phone. Is it comparable to the latest aiphone?

simonc said...

Hi Mary,
The Sony-Ericsson X10a seems to be quite a nice phone. I've had a bit of a play with a friends one and it seems to be responsive and the screen was nice bright. He hasn't had any issues with it so far and is loving Android.

The aiphone? I'm assuming iPhone. Although it depends what you are after the, I believe the, iPhone v4 is a superior phone to the X10a (particularly as it is still running Android 1.6 if you get it from Telecom NZ). There are Android devices such as the 'Google Nexus One' or 'Desire' that are comparable and run Android 2.1 or 2.2 (note that the next version is due out before the end of the year - 2.3 or 3.0).

If you are a Programmer (particularly if you use Java) then I'd suggest an Android device something like a 'Google Nexus One' or 'Desire' phone as the iPhones are very locked down.

I have found this page that seems to lay out the pro's and con's of each device quite well : http://bit.ly/999ppN (links to a page on the www.sonyinsider.com site).

Of course you now have the option of the new Windows Mobile 7 phones, but as yet I've not had a hands on play with a physical device yet, but the Development Kit is quite nice!

One final point - Once you find devices that are comparable it's basically what ever you find easiest to use and which one you feel you will get the most out of, especially as they are not cheap!

Hope this helps.

Regards,
Simon

simonc said...

Telecom NZ have given us a Motorola Flipout running Android 2.1 to give away as a prize to the winner of the challenge - Thanks heaps Telecom!!! (Phone details: http://bit.ly/bE6V3H).

It's an easy way to try Android programming with the basic code already done for you!!!

Links:
Androids in Auckland Meetup: http://www.meetup.com/Androids-In-Auckland/
The Challenge Details: http://bit.ly/aPJ7nU
The Phone: http://bit.ly/bE6V3H