Introduction to Android Development with Eclipse
James DeWitt and Sean Reifschneider
Introduction to Android
Java
Runs Linux
Android Marketplace
ADP Versus G1
Features of ADP/G1
EDGE/3G Cellular wireless data (WWAN)
WiFi 802.11b/g
Bluetooth
Calls
GPS
Compass
Accelerometers
Camera
MicroSD storage
Touch-screen
Keyboard
Development
Eclipse plugin
Java JDK 1.5 or 1.6
Android SDK
At least 1GB of RAM, probably 2.
Emulator
Getting Setup
echo 'SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"' \
>/etc/udev/rules.d/60-local-android.rules
Get a JDK if you don't have one.
Install the Android SDK.
Install Eclipse.
Installing the ADT
Download the ADT.
Probably go with 1.5
Make a directory to store it
Extract ADT
ln -s android-sdk-linux_x86-1.5_r1 android-sdk-linux_x86
PATH=$PATH:~/lib/ADT/android-sdk-linux_x86/tools
Installing Eclipse
Not the system one, you want 3.4 (ganymede).
Extract eclipse-java-ganymede-SR2-linux-gtk.tar.gz into ADT directory
ln -s eclipse-3.4SR2 eclipse
alias eclipse=~/lib/ADT/eclipse/eclipse
Run "eclipse"
If you get out-of memory problems, try something like:
eclipse -vmargs -Xmx512M -XX256M -XX:MaxPermSize=256M
Install ADT in Eclipse:
Eclipse -> Help -> Software Updates -> Available Software -> Add Site
http://dl-ssl.google.com/android/eclipse/
Creating a project:
File -> New Project -> Android
Right click project -> Android Tools -> Fix Project Properties
Plug in phone
Run -> Run, Android
Or, Debug -> Debug, Android
Gotchas?
Need to use the current Eclipse 3.4 ganymede (even on Jaunty).
May need to use the Sun 1.5 or 1.6 JDK
apt-get install sun-java6-bin
Other tools:
adb devices # List connected devices
adb shell
adb sync
adb install/uninstall <package.apk>
adb push, pull, reboot, help, etc...
adb -d <command> # Send command to device
adb -e <command> # Send command to emulator