Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install and run an app on multiple devices with a single click under eclipse

I am wondering if there is a way to install and run an android application on multiple devices/emulator with a single click under Eclipse.

When I am testing a layout on multiple (n) devices I am doing right now n times run-as (ctrl-F11 short cut in fact), choose the correct device and then check my layout on each device.

It would be great to use a single command to install and launch on all devices connected to my computer.

Does a such thing exist?

like image 435
ol_v_er Avatar asked May 30 '11 16:05

ol_v_er


2 Answers

If you using eclipse, just do below:

  1. open 'project properties' dialog.
  2. under 'Run/Debug settings', select your project and edit.
  3. another dialog should pop up, select 'target' tab, select 'Launch on all compatible devics/AVD's '.

  4. Apply and you should get all of devices install when Run/Debug.

like image 123
ylchung Avatar answered Oct 05 '22 21:10

ylchung


The simplest way is to have a batch file (or shell script) with several lines

adb -s SERIAL_NO install workspace/YOUR_PROJECT/bin/YOUR_APK.apk

Make sure that Eclipse is set to build the project automatically. Then, it's not one-click, but close:

  • Ctl-Shift-S to save all,
  • Alt-TAB to get to the command prompt,
  • up arrow enter to rerun the script.
  • Enjoy. 5 seconds tops ;)
like image 41
Aleadam Avatar answered Oct 05 '22 19:10

Aleadam