Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

Designing a Real App 355

Designing a Real App


Android apps can exploit all the device’s functionality, such as SMS messag-
ing, location-based services, and touch input. In this book’s final program-
ming project, you create a real app called Take Me To Your Leader.


This app takes advantage of an Android phone’s capabilities to make a phone
call, visit a website, and load a location in Google Maps. The app puts you in
touch with the White House via phone, Web, and maps. (If the president of the
United States is not your leader, the app can be customized.)


To get started, you create a newproject in Eclipse by performing these steps:



  1. Click File, New, Android Project. The New Android Project Wizard opens.

  2. In the Project Name field, enter Leader.

  3. Make sure Create New Project in Workspace is selected.

  4. Choose the Build Target Android 2.2.

  5. In the Application Name field, enter Take Me To Your Leader.

  6. In the Package Name field, enter org.cadenhead.android.

  7. Make sure Create Activity is selected, and enter LeaderActivityin the
    adjacent text field. The wizard should resemble Figure 24.9.

  8. Click Finish.


FIGURE 24.9
Creating a new Android project.
Free download pdf