Android classes - Day 2 - basic concepts overview

Welcome to Day 2 of my Android classes. Today we want to get a good overview of what the Android SDK offers you. Normally when you start learning a programming language you should start reading a lot of basics about it. Of course this is a good idea and when you really want to develop professional apps for Android phones then you will not get around this. But this is not really the idea of this tutorial - so today I want to show you in another hour of your spare time what you can do and how easy it can be. You should already have some knowledge about Java programming - if not you should maybe start with learning Java first. And of course there are other ways (without the SDK) to develop apps for android - maybe just using J2ME, Flash or maybe Qt might be options that get interesting for better cross platform development. I will keep writing on this continuously changing subject in the slash4 blog ...

So whenever you want more detailed info on a special subject you might want to get back to http://developer.android.com/index.html and read the Dev Guide or the community groups which offer a lot of good information.

Contents

Agenda Day 2

Dev Guide

First I want you to open http://developer.android.com/index.html and fly over the chapters real quick. Take yourself 15 Minutes to fly over the chapters. You don't need to read everything and of course you don't need to understand everything - you should just see what information you can find there when you need it.

SDK Examples

The SDK comes with some quite good examples. For me these were the best resource for learning. I spent like 10 hours reading the dev guide and experimenting how I could do this or that until I found that you can find an example for nearly every basic task that you are looking for.

So open up eclipse ...

Here you find a list of the SDK examples.

ApiDemos

First we want to choose "ApiDemos" ... click OK

Your emulator should pop up with the "ApiDemos" application. Now you should take yourself 25 minutes and navigate through all options "real quick". You must use the "menu" and the "back" key to be able to use all the features. ApiDemos will show you most of the features that the android SDK offers by default. For example you might need a "DatePicker" in your app ... you don't have to reinvent the wheel - a stylish, easy to use and optimized DatePicker is already there. And you just need to check the source code and you know how to embed it to your app ...

ApiDemos will also show you the "best practices" for UI design on an android device. Having an intuitive UI for all apps is really important to make the platform (and your app) successful - so you should use what the SDK offers to you. Also try to remember the features - maybe you need to come back later to check the source code how a specific part of the API can be used. Also examples for accessing special features of the phones hardware like sensors or compass can be found there - but you may not be able to test them within the emulator ...

Notepad

Next open another sample project ... choose Notepad ... and run the application ... play around with the emulator.

This Demo is a real application example. It uses a SQLite Database to store, show and edit notes. It also defines a custom view. Add some notes, try to change the node title (open node, then click menu, then edit title) and try to delete a note (long press on the note in the list -> delete).

This should give you a feeling about an android apps UI design.

Screencast

Androidâ„¢ is a trademark of Google Inc. Use of this trademark is subject to Google Permissions