Running on a Real Phone

Running an Android program on a physical device such as the Droid or Nexus One during development is almost identical to running it on the emulator. You need to enable USB debugging on the phone itself (by starting the Settings application and selecting Applications > Development > USB Debugging), install the Android USB device driver if you haven't already (Windows only), and then plug the phone into your computer using the USB cable that came with the phone.7

7. See http://d.android.com/guide/developing/device.html for the latest device driver and installation instructions.

Close the emulator window if it's already open. As long as the phone is plugged in, Eclipse will load and run applications on the phone instead.

When you're ready to publish your application for others to use, there are a few more steps you'll need to take. Chapter 14, Publishing to the Android Market, on page 271 will cover that in more detail.

0 0

Post a comment