
</manifest>
Things to note:
• The package name from the source file is represented here. This follows
a similar pattern to a Java source file and imports. The <manifest> tag
is in essence "importing" classes from this package. All non-fully qualified
classes in this file are found in the package identified in the package
attribute.
• The <application> tag has an attribute that references a resource
from the application's resources. Note the @ symbol preceding the
drawable identifier. This is a hint for the file to look in the drawable folder
of the application's resources for a resource called "icon."
• The <activity> tag contains the following attributes and values of note:
• class represents the Java class implementing this activity
• android:label is the name of the application. Note that it is coming
from one of the string resources. The string.xml file contains localized
strings for the application.
• <intent-filter> represents the IntentFilter available in the
sample application. This is the most common IntentFilter seen in
Android applications. This filter essentially says that it implements the
"main" action (or entry point) and is located in the launcher of the OS.
In English, this means it can be started as an application from the
primary list of applications on an Android device.
The next section describes starting the application on the Android Emulator from
within Eclipse.
Running the application
Now that the application has compiled successfully, it's time to run the sample
application. Select Open Run Dialog or shortcut on the toolbar within Eclipse. This
opens a dialog where startup configurations are created. Highlight the Android
Application option and click the icon for New.
Figure 6 show the values used for the tutorial sample.
Figure 6. Run dialog
developerWorks® ibm.com/developerWorks
Develop Android applications with Eclipse
Page 20 of 35 © Copyright IBM Corporation 1994, 2008. All rights reserved.
Kommentare zu diesen Handbüchern