DONN FELKER

Lessons Learned From the Software Industry

  • Home
  • About
  • Caster.IO
  • Fragmented Podcast
  • A Newsletter For Maximizing Your Life
  • Contact

Connect

  • GitHub
  • Instagram
  • LinkedIn
  • RSS
  • Twitter

Powered by Genesis

Running Your Android App on a Device

June 29, 2009 by Donn Felker 1 Comment

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.

Filed Under: Mobile

Get posts like this in your inbox.

Everything I share on my site will get sent out to my email newsletter first. This includes new articles, any things I’m working on, early access and discounts to products/books/ebooks and more. If you want it early, hop on the list below.

What kind of stuff am I going to be sharing?

A lot about how to start consulting, working for yourself, productivity, discipline, hard work, fitness, and more. I look forward to chatting with you via email.

Comments

  1. Paul says

    May 31, 2010 at 12:38 pm

    Awesome! I am new to Eclipse (.Net developer) and this has caught me up for about 30 minutes now. Thanks for the post!

Leave a Reply Cancel reply

You must be logged in to post a comment.

Fragmented - A Software Developer Podcast

Projects / Apps

Caster.IO
Fragmented Podcast
American Express Android
Aaptiv
AndroidJobs.IO
Groupon
MyFitnessPal
Poynt

Books

  • Android Developer Tools
  • Android App Dev For Dummies V2 (V1)
  • Android Tablet App Dev for Dummies

Categories

  • Book
  • Business
  • Development
  • Health
  • Marketing
  • Misc
  • Mobile
  • Podcast
  • Screencasts
  • Uncategorized