In the Properties section, type Hello Android in the Application Name box.
Chapter 3: Your First Android Project
The gen folder is automatically generated by Eclipse and the ADT when the compilation takes place. As soon as the New Android Project wizard was completed, a new project was created and saved in Eclipse’s work- space. Eclipse recognized this fact and said, “Hey I see some new files in my workspace. I need to report any errors I find as well as compile the proj- ect.” Eclipse reported the errors by placing an error icon over the folder. Immediately thereafter, the compilation step took place. During the compila- tion step, the gen folder was created by Eclipse, and the project was success- fully built. Then Eclipse recognized that the project did not have any more errors. At that time, it removed the error icon from the folder, leaving you with a clean workspace and a clean folder icon, as shown in Figure 3-8. Figure 3-8: A project in the Package Explorer that has no errors. Notice the folder icon; it has no error icon overlay on it. A project without any errors Understanding the Build Target and Min SDK Version settings So how does the Build Target setting differ from the Min SDK Version setting? The build target is the operating system you’re going to write code with. If you choose 2.2, you can write code with all the APIs in version 2.2. If you choose 1.6, you can write code only with the APIs that are in version 1.6. You can’t use the Bluetooth APIs in version 1.6, for example, because they weren’t introduced until version 2.0. If you’re targeting 2.2, you can write with the Bluetooth APIs. Know which version you want to target before you start writing your Android application. Identify which Android features you need to use to ensure that your app will function as you expect. If you’re positive that you’re going to need Bluetooth support, you need to target at least version 2.0. If you’re not sure which versions support the features you’re looking for, you can find that information on the platform-specific pages in the SDK section of http: d.android.com. The Android 2.2 platform page is at http:d.android. comsdkandroid-2.2.html.Parts
» android application development for for dummies
» Developing Spectacular Android Applications
» Prepping Your Development Headquarters
» Click the New button see Figure 2-13. Click
» Click the curved-arrow icon on the right side of the screen to go to the workbench.
» Start Eclipse, if it’s not already running. 2.
» Type a name in the Name field.
» Type Prepping Your Development Headquarters
» Click the OK button. Android ADT is selected in the Work With drop-down menu, and the
» In the Build Target section, select Android 2.2.
» In the Properties section, type Hello Android in the Application Name box.
» In the Package Name box, type com.dummies.android.helloandroid.
» In the Min SDK Version box, type 8. Your screen should now look similar to Figure 3-5.
» Click the Create AVD button. Close the Android SDK and AVD Manager dialog box.
» Your First Android Project Your First Android Project
» Designing the User Interface Designing the User Interface
» Designing the User Interface
» Choose Window➪Show View➪Other. 2. Expand Java and choose Properties.
» Select the main.xml tab. 2. Add the background property to your LinearLayout:
» Verify that the definition for LinearLayout looks like this:
» Save the file. 5. Select the Layout tab to view the visual designer.
» Coding Your Application android application development for for dummies
» In Eclipse, choose Run➪Run or press Ctrl+F11 to run the application.
» Return to the home screen by clicking the home button on the emulator.
» Coding Your Application Coding Your Application
» If Eclipse is not open, open it now and open the main.xml file in the layouts
» Choose the Extract Android String option.
» Understanding Android Resources android application development for for dummies
» Turning Your Application into a Home-Screen Widget
» When the Add to Home Screen dialog box is visible, select Widgets, as shown in Figure 7-5.
» When the Choose Widget dialog box is visible, choose Silent Mode Toggle, as shown in Figure 7-6.
» Publishing Your App to the Android Market
» Click the Continue button to pay the developer fee with Google Checkout.
» On the order confirmation page see Figure 8-11, click the Place Your Order Now button.
» Click the Android Market Developer Site link.
» Read the terms and then click the I Agree, Continue link.
» On the Android developer home page refer to Figure 8-14, click the Upload Application button.
» For the Application .apk file, choose the .apk file that you created
» In the Screenshots section, add two screen shots of your application.
» Set the title of your application.
» Set the description for your application.
» Set the promo text of your application.
» Designing the Task Reminder Application
» Install the application in the emulator, and click the Menu button.
» Going a la Carte with Your Menu Going a la Carte with Your Menu
» Going a la Carte with Your Menu
» Handling User Input android application development for for dummies
» Is this a long-running task?
» Does the user need to be able to perform an advanced action in the dialog box?
» Does the user need to answer a question such as “Are you sure?” with a value of Yes or No?
» Does the user simply need to be alerted?
» Getting Persistent with Data Storage
» Reminding the User with AlarmManager
» Updating the Android Status Bar
» Working with Android’s Preference Framework
» Working with Android’s Preference Framework Working with Android’s Preference Framework
Show more