Recipe Specifying a Run Configuration

The run configuration is a separate profile for each application. It tells Eclipse how to run the project, start the Activity, and whether to install the application on the emulator or a connected device. The ADT automatically creates a run configuration for each application when it is first created, but it can be customized as described here.

To create a new run configuration or edit an existing one, select Run ^ Run Configurations... (or Debug Configurations...) in Eclipse to launch the Run Configurations menu shown in Figure 12.1. Inside the run configuration, there are three tabs related to application testing:

■ Android—Specify the project and activity to launch.

■ Target—Select the virtual device upon which the application will run. For the emulator environment, the launch parameters are specified here, such as the network speed and latency.This allows for a more realistic simulation of the wireless link conditions to test how the application behaves. Developers can also choose to wipe out the persistent storage of the emulator with every launch.

■ Common—Specify where the run configuration settings are saved and also whether the configuration is displayed in the Favorite menu.

Figure 12.1 The Run Configurations menu in Eclipse.

After these settings are properly set, the application can be run on the target device with a single click of the Run button. If an actual Android device is not connected to the host computer or the target chosen is a virtual device, the emulator is launched to run the application.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment