Saturday, November 7, 2009

[An]Droid First App Deployed

---10 minutes later---

Despite my earlier problems, I was able to actually create a Hello World application and deploy it to my Droid. The application itself was a 45 second quickie with virtually nothing done to a standard Eclipse Android project. Once the device was plugged in using the USB cord and was recognized by Eclipse (albeit with some of the buttons disabled), the deployment itself was trivial, as outlined here:


Yup, just:
  • Right-Click on the project.
  • Select Run-As
  • Select Android Application
The way this worked was that I am running the adb daemon as root, launched from a sudo'ed shell. This established a privileged connection to the Droid. When I switched to the DDMS Perspective in Eclipse (running under my own user id) , it warned me that the debug port was already bound, but the device view displayed the Droid device just fine.



If you have more than one device/emulator attached, or you have a device and an emulator attached, you will be prompted to pick a deployment target:


I picked my Droid to deploy to and a split second later, it popped up on the Droid's display:


As an aside, the icons on the top bar there (left to right) indicate:
  • A current USB connection to the device is active
  • The application is running under Debug mode
  • The device's Bluetooth radio is turned on
  • The Verizon 3G network radio is turned on
  • The device's Wifi radio is turned on
  • The battery is fully charged
As simple as this application is, I feel like I have a significant accomplishment under my belt now. Just another 300,000 lines of Java and XML and I should have a real application.

No comments:

Post a Comment