Friday, March 05, 2010

Android Development 101

Assume you have Eclipse 3.5 installed.

Step 1: Download the Android SDK. It is usually tgz for linux.
Step 2: Install the Android plugin for eclipse.
http://developer.android.com/sdk/eclipse-adt.html

Step 3: Open Eclipse and Create a AVD (Android Virtual Device)
=========================================
To create an AVD with the AVD Manager:

1. Select Window > Android SDK and AVD Manager, or click the Android SDK and AVD Manager icon (a black device) in the Eclipse toolbar.
2. In the Virtual Devices panel, you'll see a list of existing AVDs. Click New to create a new AVD.
3. Fill in the details for the AVD.
Give it a name, a platform target, an SD card image (optional), and a skin (HVGA is default).
4. Click Create AVD.
================================

Step 4: Now create a new Android project. File -> New -> Android - >Android Project. Choose a target.


Testing on your phone :-
Best is to have the Android Development Phone 2 (ADP2).

Then to debug your application from Eclipse onto the phone.
1) Set up your ADP2 or your device to USB connect with your computer.
2) Make your application "debuggable". You need to do this in the android manifest.
3) Eclipe Run -> Run As -> Android Application


Note: To set up ADP2 on Fedora/Ubuntu, do the following:

$> sudo vi /etc/udev/rules.d/51-android.rules.
UBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

$> $ sudo chmod a+r /etc/udev/rules.d/51-android.rules.

No comments: