Setting Up Your Phone

The Android SDK includes an emulator that acts like an Android phone and can run the apps you create. This comes in handy as you’re writing an app because you can get it working in a test environment, but at some point you need to see how it works on an actual Android phone (or other device).

You can deploy apps you write with the SDK on an Android device over your computer’s USB connection. You can use the same cord you use to transfer files to and from the device.

Before connecting the cord, you must enable USB debugging on the phone by following these steps:

1. On the phone’s Home screen, choose Menu, Settings. The Settings app opens.

2. Choose Applications, Development and check the USB debugging box.

Figure D.4. Using ...

Get Sams Teach Yourself Java™ in 24 Hours, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.