Friday, November 16, 2007

Just show me the code

OK, you've downloaded the SDK and are now ready to build the next killer app for mobile (and maybe win some $$$ in the process ;)

Activities? Intents? SimpleCursorAdapter? Huh?
Hmm...how do I proceed?

Well, that depends on your style. Some will want to carefully go through all the documentation top-to-bottom, while others may prefer to just dive right into code.

Either path will eventually lead to the sample applications provided in the SDK -- these samples will be invaluable in your quest for Android mastery. The samples include:

API Demos
A 'kitchen sink' application that covers the most useful aspects and components of the Android APIs. You'll see different implementations of Activities, Services, Notifications, Layouts, as well as methods for working with graphics and text. This application provides a good source of templates for your projects as well as a reference to 'How do I do this?'-type questions.
Lunar Lander
A game which demonstrates how to load and draw graphics, animation techniques, taking user input, saving state when the user pauses the game, and more. Coding shouldn't be this fun!
Note Pad
You'll learn how to use Intents to open a new screen, access a local database, and more. This sample is a good introduction to application flow and life cycle management, which are vital in developing more complex applications.

Source code and resources for these applications are available in the SDK (samples/) as well as online:

http://code.google.com/android/samples/

Here are some suggestions on what to do next:
  • Read through each application's manifest file (AndroidManifest.xml) to learn about the typical structures in an Android application.
  • Modify the code to familiarize yourself with the building and testing process.
  • Use a particular code snippet as either a base template or to get some needed functionality for your own project (why reinvent the wheel?)
Put these sample applications through their paces; and if you get stuck, please post your questions to the Android Developers Discussion Group.

3 comments:

larry said...

hi john
if your interested in a follow up story to your earlier story on zzzphone in new york times please read this; you can call me at xxxxxxxxxx for more details. also we have the names of 3 MIT students who have been working summers for google android. they have been offered full time after post grad from MIT. the MIT android team were awarded $350,000 in the contest while our 4 submissions were thrown out. we have since applied for china and USA patents on our 4 software/hardware apps.
further we have been bad mouthed on the official google android blog , saying we are not recognized by google. while the android system is revolutionary and complements our revolutionary process of custom making each cell phone to each customers requirement,(including free uploading 3 android softwares of customers choice),it is anything except "open source"
as david killed goliath, we are beating google to worldwide markets (except we lose the first battle by 1 month in USA). and with a far superior, unlocked(really open sourced), 2 sim card phone. at less than half the true google phone price($179 plus $840 in extra t-mobile charges over 2 years) price.
to my knowledge only google and zzzphone are taking orders as of now.
our engineering team has 22 Chinese in shenzhen as opposed to the 1000s working in the "alliance" you can see the press release (attachment) and our phone at www.zzzphone.com beta
larry horowitz, president

James said...

Good information about coding for mobile application. In fact Android is one of the toughest application in mobile industry. That is why Tmobile and Tmobile G1 accessories are in great demand. Thanks for givinig such person. Keep posting like this.

From.Ae said...

No wonder why you receive countless of feedbacks.

Android Developer in Pakistan