← All articles
mobile

Running Your Android App on a Device

The Android dev guide's device-testing steps left out one thing: switching Eclipse's Run Configuration target to manual to get the device chooser.

Donn Felker

Donn Felker

2009.06.29 · 2 min read

androidlogo I’m impressed with the Android Dev Guide. It’s fairly comprehensive guide, however, I can say from personal experience that the Dev Guide is not complete in all areas.

One key example is the section on developing on a device. I followed the instructions exactly. The last couple of lines state the following:

You can verify that your device is connected by executing adb devices from your SDK tools/ directory. If connected, you’ll see the device name listed as a “device.”

If using Eclipse, select run or debug as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device to install and run the application there.

So, I do exactly that:

As you can see, my device was found. image

I use Eclipse for my Android development so I hit Run and I got this window:

image

No where in there do I see my device. The docs state you’ll see a “Device Chooser”. Unfortunately I did not. I got a “Run As” Dialog.

The Issue

Being that I’m not a day to day Eclipse/Android developer I was at a loss for what to do now. After a few hours of poking fumbling around I traced the problem back to a Run Configuration in Eclipse.

Here’s how to fix it. Open the Run Configurations:

image

Once this Window Opens, click on the Target Tab. Then select the “manual” option and then click run (as shown below).

(Click for larger image). 

image

Now click “RUN” and you’ll get a device chooser like this:

(click for larger image)

image 

Select this device and click “Ok”. You’re app will now be installed on your device.

Now you’re back to testing, this time on a real device, not on an emulator.

Final Notes

You’re going to want to test your app on an actual device.

For my current personal project I’m using the G1’s built in accelerometer. I’ve found some simulators out there for the accelerometer and they have worked great, but I still need to see what the app will do on an actual device. Installing it on an actual device detailed a couple of critical issues that the emulator did not illustrate. I’d say, from personal experience, the emulator is the perfect example of the Pareto principle as it fulfills the 80/20 rule. 80’% of the features you’ll use in the G1 can be effectively simulated in the emulator. The other 20%, you’ll need to test on an actual device as well as on the emulator (as the emulator makes development super easy).

I will always test my app on an actual device to see what the user experience is going to be like, I advise you do the same.

Donn Felker

Written by Donn Felker

I've spent 25+ years shipping software, writing books, and running my own companies. I write about thinking clearly, working for yourself, and doing real work while AI rewrites the rules. New essays land here every week.

Get the newsletter

Keep reading