O'Reilly logo

Android Application Development For Dummies, 2nd Edition by Donn Felker, Michael Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Silent Mode Toggle Application

Create the new application by choosing File⇒New Project. Choose Android Project from the list, and then click the Next button. Use Table 4-1 for your project settings.

Table 4-1 Project Settings for Silent Mode Toggle

Setting

Value

Application Name

Silent Mode Toggle

Project name

Silent Mode Toggle

Contents

Leave the default selected (create new project in workspace)

Build target

Android 4.1

Package name

com.dummies.android.silentmodetoggle

Create activity

MainActivity

Min SDK Version

8 (2.2)

Click the Finish button. You should now have the Silent Mode Toggle application in your Package Explorer, as shown in Figure 4-1.

technicalstuff.eps If you receive an error that looks similar to this — “The project cannot be built until build path errors are resolved” — you can resolve it by right-clicking the project and choosing Android Tools⇒Fix Project Properties. This realigns your project with the IDE workspace.

Figure 4-1: The Silent Mode Toggle application in Eclipse.

9781118417454-fg0401.tif

tip.eps Notice how you set the build target to 4.1 and the minimum SDK to 2.2 (API level 8). What you have done is told Android that your code can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required