The Android SDK provides a powerful tool for programming mobile devices, and the best way to master such a tool is to get our hands dirty right from the very beginning.
You can work through this book step by step as a complete guide, and if you have ideas for your own applications, which I'm sure you do, then just look up the relevant chapter and recipe and dive right in.
The Activity class provides one of the fundamental building blocks of Android development, forming the primary interface between the user and an application.
Activities are the elements of an application that the user sees and interacts with and they are generally displayed within a rectangular portion (if not all) of the screen. For those with a background in Java, an activity can be thought of as being similar in function to the Swing JFrame.
This chapter explains how to declare and launch activities within an application, and how to manage several activities at once by sharing data between them, requesting results from them, and by calling one activity from within another.
This chapter also briefly explores the Intent object, which is often used in conjunction with activities (as well as other fundamental components) and is very handy for starting an activity from any point.
Note
Before following the recipes in this book you will need to install the Android SDK, the Android AVD manager, and the Eclipse IDE, along with the ADT plugin. The ADT plugin, which stands for Android Development Tools, provides a seamless way to add Android-specific controls to the Eclipse IDE.
Instructions on how to do this can be found at http://developer.android.com/sdk/installing.html.