The application is deployed to the Emulator directly
from the Eclipse. To deploy the application on the Android powered device,
following are the steps:
Declare Application as
‘debuggable’
We will declare our application as ‘debuggable’ in Android Manifest.xml file shown in Fig.1 at position 6 by adding android: debuggable="true" to the <application>
element.
Android Device Setup
We will turn on the ‘USB Debugging’ on the device
·
On the device, go to home screen, press MENU then select Application->Development
·
Enable ‘USB
Debugging’
System Setup to detect the
device
This step varies for different operating systems on
which we are developing our application.
Windows
Install a USB driver for adb (Android debug Bridge)
Mac OS
For Mac OS X, skip this step as it works fine.
Ubuntu Linux
In case of Ubuntu Linux, we need to add a rules file
that contains a USB configuration for the device (Vendor Id) which we are using
for development.
·
Log in as root and create this file: /etc/udev/rules.d/51-android.rules
§ For Gusty/Hardy,
edit the file to read:
SUBSYSTEM=="usb",
SYSFS{idVendor}=="0bb4", MODE="0666"
§ For Dapper, edit
the file to read:
SUBSYSTEM=="usb_device",
SYSFS{idVendor}=="0bb4", MODE="0666"
·
Now execute:
chmod
a+r /etc/udev/rules.d/51-android.rules
Run the Application
If you
are using Eclipse, then select Eclipse->Run->Run
Configurations->Run, in the available Device Chooser dialog that lists the available emulators and
connected devices, select the device and click Run
If you
are using command line, then open the cmd window and run the following command
to run the application
C:\[path_to_adb_tool] > adb install
[path_to_apk]\ [appname].apk
Enjoy your application watching at your
mobile J