2.3.3. New Android Application Dialog

In the New Android Application dialog’s first step (Fig. 2.2), specify the following information, then click Next >:

1. Application name: field—Your app’s name. Enter Welcome in this field.

2. Project name: field—The project’s name, which is displayed in the project’s root node in the IDE’s Package Explorer tab. By default, the IDE sets this to the app name without spaces and with each word capitalized—for an app named Address Book, the project name would be AddressBook. If you prefer to use a different name, enter it in the Project name: field.

3. Package name: field—The Java package name for your app’s source code. Android and the Google Play store use this as the app’s unique identifier, which must remain the same through all versions of your app. The package name normally begins with your company’s or institution’s domain name in reverse—ours is deitel.com, so we begin our package names with com.deitel. Typically, this is followed by the app’s name. By convention, package names use only lowercase letters. The IDE specifies a package name that begins with com.example by default—this is for learning purposes only and must be changed if you intend to distribute your app.

4. Minimum Required SDK: field—The minimum Android API level that’s required to run your app. This allows your app to execute on devices at that API level and higher. We use the API level 18, which corresponds to Android 4.3—the lower of the two versions we use in this book. Figure 2.3 shows the Android SDK versions and API levels. Other versions of the SDK are now deprecated and should not be used. The percentage of Android devices running each platform version is shown at:

Image

Fig. 2.3 | Android SDK versions and API levels. (http://developer.android.com/about/dashboards/index.html)

5. Target SDK: field—The preferred API level for your app. We use level 19 for this book’s apps. At the time of this writing, 26% of Android devices still used level 10. When developing apps for distribution, you often want to target as many devices as possible. For example, to target devices with Android 2.3.3 and higher (98% of all Android devices), you’d set the Minimum Required SDK to 10. If it’s set to an earlier API level than the Target SDK, you must ensure either that your app does not use features from API levels above the Minimum Required SDK or that it can detect the API level on the device and adjust its functionality accordingly. The Android Lint tool that the IDE runs in the background points out unsupported features that you use.

6. Compile With: field—The version of the API used when compiling your app. Normally this is the same as the Target SDK, but it could be an earlier version that supports all the APIs used in your app.

7. Theme: field—Your app’s default Android theme, which gives the app a look-and-feel that’s consistent with Android. There are three themes you can choose from—Holo Light, Holo Dark and Holo Light with Dark Action Bars (the default specified by the IDE). When designing a GUI, you can choose from many variations of the Holo Light and Holo Dark themes. For this chapter we’ll use the default theme, and we’ll discuss themes in more detail in subsequent chapters. For more information about each theme and to see sample screen captures, visit

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.34.154