views:

102

answers:

1

I have just finished my android application and now it's time to test it under real-life conditions. The only problem is I'm clueless as to how to take the application and transfer it over to a device. I have already signed the application. What's next?

Thanks in advance for your help!

+5  A: 

If you can connect the device to your computer you can do it by:

  • Executing this on a command line: adb install name_file.apk, where install name_file.apk is inside the bin directory of the project. adb is a command line tool that lives in the tools directory of the SDK.
  • Copying the .apk file directly to your device and opening with a file manager.

If you are using Eclipse:

Windows:

  • Plug in your device
  • Open the Android project
  • Open the 'Run Configurations' Wizard. You can do it by clicking in the right side of the "Run" button (not in the button, but in the arrow next to it).

alt text

  • Once you get there, click on the run configuration of your project. Then, on the 'Target' tab, choose Manual. It will let you choose manually the device where you want to run your program.
  • Click Apply and Run
  • From now on, and if your device is properly plugged-in, you will see the name of your device into a list of devices. If you select the item that corresponds to your device and click run, eclipse will automatically compile and install the program in your handset.

Linux

If you are using Linux, which would be weird since you seem to be afraid of the command line, you first have to create an udev rule by creating a file called /etc/udev/rules.d/99-android.rules and putting this content into it:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"

Where 0bb4 is the idVendor of your device. To know the idVendor you can use the lsusb command. Once you have done so, you can follow the steps I wrote in the Windows section.

Cristian
Is there an easier way to do this with eclipse?
Ryan
Of course... check my answer again. I have updated it.
Cristian
Awesome. Thank you so much!!
Ryan
@Cristian: Any idea why my device, although plugged in a working usb on my windows 7 pc, would not be visible in the list ? I have a Samsung Galaxy S phone.
Edelcom