5 Jan 2013

Get physical with a real Android device

The emulator is awesome, but sometimes you need an actual device to test on. The DDMS allows you to debug your app on an actual device, which comes in handy for developing apps that use hardware features that aren’t or can’t be emulated. Suppose that you’re developing an app that tracks the user’s location. You can send coordinates to the device manually, but at some point in your development, you probably want to test the app and find out whether it in fact displays the correct location. Using an actual device is the only way to do this.

 If you develop on a Windows machine and want to test your app on a real device, you need to install a driver. If you’re on a Mac or Linux machine, you can skip this section, because you don’t need to install the USB driver.

To download the Windows USB driver for Android devices, follow these steps:

1. In Eclipse, choose Window➪Android SDK and AVD Manager. The Android SDK and AVD Manager dialog box opens (see Figure).

2. In the left pane, select Available Packages.

3. Expand the Android repository, and select the USB Driver package.

physical with a real Android device

4. Click the Install Selected button. The Choose Packages to Install dialog box opens.

5. Select the Accept radio button to accept the license and then click the Install button (see Figure).The Installing Archives dialog box opens, displaying a progress bar.

physical with a real Android device

6. When the package finishes downloading and installing, click the Close button.

7. Exit the Android SDK and AVD Manager dialog box.

No comments:

Post a Comment