Changes

Jump to: navigation, search

Creating an Example Kindle Fire Android Application

1,092 bytes added, 20:01, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<td width="20%">[[Creating a Kindle Fire Android Virtual Device (AVD)|Previous]]<td align="center">[[Kindle Fire Development Essentials|Table of Contents]]<td width="20%" align="right">[[Testing Android Applications on a Physical Kindle Fire Device with ADB|Next]]</td>
<tr>
<td width="20%">Creating a Kindle Fire Android Virtual Device (AVD)<td align="center"><td width="20%" align="right">Testing Android Applications on a Physical Kindle Fire Device with ADB</td>
</table>
<hr>
== Creating a New Android Project ==
The first step in the application development process is to create a new project within the Eclipse IDE. Begin, therefore, by launching Eclipse and accepting the default path to your workspace in the Workspace Launcher dialog as illustrated in Figure 5 -1 (or choose another location if the default is unsuitable). Note that if you do not wish to be prompted for the location of the workspace each time Eclipse loads, simply select the Use this as the default and do not ask again option before clicking on OK.
[[Image:eclipse_select_workspace.png|Selecting an Eclipse Workspace]]
Figure 5-1
Once the workspace has been selected, the main Eclipse workbench window will appear ready for a new project to be created. To create the new project, select the File -> New -> Android Application Project… menu option.
== Defining the Project Name and SDK Settings ==
[[Image:eclipse_new_project_sdk_settings.png|Configuring the SDK settings for a new Android app]]
Figure 5-2
[[Image:eclipse_configure_new_application.png|Configuring a new Android project in Eclipse]]
Figure 5-3
[[Image:android_launcher_icons.png|Configuring an Android launcher icon]]
Figure 5-4
[[Image:android_create_activity.png|Configuring an Android Activity]]
Figure 5-5
[[Image:android_activity_creation.png|Configuring a new Android Blank Activity]]
Figure 5-6
[[Image:eclipse_main_new_project.png|The Eclipse main window]]
Figure 5-7
[[Image:kindle_fire_test_app_running.png|An example Android app running in the emulator]]
Figure 5-8
[[Image:eclipse_ddms_button.png|Selecting the Eclipse DDMS perspective]]
Figure 5-9
[[Image:eclipse_ddms_perspective.png|The Eclipse DDMS perspective]]
Figure 5-10
[[Image:eclipse_ddms_devices.png|A list of connected devices in the DDMS]]
Figure 5-11
[[Image:eclipse_package_explorer.jpg|The Eclipse Package Explorer]]
Figure 5-12
[[Image:eclipse_graphical_layout_tool.png|The Android Graphical Layout tool]]
Figure 5-13
[[Image:eclipse_user_interface_outline.png|The Eclipse Outline panel]]
Figure 5-14
[[Image:kindletest_centered_large_textview.png|A Centered TextView object]]
Figure 5-15
[[Image:eclipse_multiple_Editing_tabs.png|Eclipse editing tabs]]
Figure 5-16
[[Image:android_layout_xml_file.png|Eclipse XML view]]
Figure 5-17
Whilst not excessively complex, a number of steps are involved in setting up an Android development environment for the Kindle Fire. Having performed those steps, it is worth working through a simple example to make sure the environment is correctly installed and configured. In this chapter, we have created an application and then run it within a Kindle Fire AVD emulation environment. The Eclipse Graphical Layout tool was then used to modify the user interface of the application. In so doing, we explored the importance of using resources wherever possible, particularly in the case of string values, and briefly touched on the topic of layouts. Finally, we looked at the underlying XML that is used to store the user interface designs of Android applications.
Now that we have looked at running applications within an AVD emulator environment, the next chapter will cover [[Testing Android applications Applications on a physical Physical Kindle Fire deviceDevice]].
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">
<td width="20%">[[Creating a Kindle Fire Android Virtual Device (AVD)|Previous]]<td align="center">[[Kindle Fire Development Essentials|Table of Contents]]<td width="20%" align="right">[[Testing Android Applications on a Physical Kindle Fire Device with ADB|Next]]</td>
<tr>
<td width="20%">Creating a Kindle Fire Android Virtual Device (AVD)<td align="center"><td width="20%" align="right">Testing Android Applications on a Physical Kindle Fire Device with ADB</td>
</table>

Navigation menu