How To Run Your Android App On Your Hardware Device from Eclipse and DDMS

For Android and for your particular hardware device, you may have to download and install some kind of a driver. I know my HTC Wildfire S was virtually ignored by the computer (Windows XP) until I installed the corresponding driver.

You may not have this problem if you are using devices that fit more naturaly, such as using Google devices to develop for.

Once you connect your device to Eclipse, pay attention to the DDMS perspective. It is very important to use that view, because it is from that perspective that you are able to take screenshots of your device directly to the clipboard.

Once that the device is connected, you may run the app directly on the device if you set it up in that way. Right click on the name of the app, then Run As > Run Configurations > Target tab, then click on Launch on all compatible devices, and finally Run.

That will run the app on the device. Sometimes you will not be able to run it directly, then just uninstall the old app on the device and run it again from Eclipse.

The other way to run your app is to treat the device as a USB external drive and copy the apk file directly to it. You will find the apk file in the bin folder of the app. I then run Astro manager (a free download from the Play store), then execute the apk file, which has the effect of installing the app. Then you run the app from the icon on the device and usually it all goes smoothly. It is best to set Install location to internalOnly in the AndroidManifest.xml file while you are testing, and then, for the final deployment, change that parameter to preferExternal, because lots of people will just uninstall the app if they see that it runs in the internal memory only.

This entry was posted in Android and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.