Common Tasks and How to Do Them in Android

Creating an Android Application using the Eclipse plugin

Creating an Android Application without the Eclipse plugin

Adding an External Library (.jar) using Eclipse

• Implementing Activity callbacks (Android calls your activity at various key moments in its life cycle. You must know how to handle each of these to draw your screen, initialize class members, and acquire data.)

Opening a new screen

Listening for button clicks

Configuring general window properties

Referring to localhost from the emulated environment

Storing and retrieving state

Storing and retrieving preferences

• Storing and retrieving larger or more complex persistent data (files and data)

Playing audio, video, still, or other media files

Listening for and broadcasting global messages and setting alarms

Displaying alerts

Displaying a progress bar

Adding items to the screen menu

Display a web page

Binding to data

Getting a Handle to a Screen Element

Capture images from the phone camera

Handling expensive operations in the UI thread

Selecting, highlighting, or styling portions of text

Utilizing attributes in a Map query

List of files for an Android application

Print messages to a log file

The ApiDemos sample application includes many, many examples of common tasks and UI features. See the code inside <sdk>samples/ApiDemos and the other sample applications under the samples/ folder in the SDK.

0 0

Post a comment