Phone Accessories with the Android ADK
- 1 Slides
- 2 In-class examples
Check out the latest example from the class SVN using:
svn co http://berkeleyhci.unfuddle.com/svn/berkeleyhci_devicedesign/utils/nodejs-serial
Alternatively, download this file of rev192: File:Nodejs-serial-r192.zip
Overview - Software:
- Install Java.
- Install Eclipse.
- Install the Android SDK.
- Install the Eclipse Android ADT Plugin.
- Import the IOIO library and sample apps.
- Run the sample apps.
- Get a desktop power supply - adjust to 9V before connecting to anything, then turn back off.
- Solder female 0.1" headers to the IOIO board.
- Connect power to GND and VIN via stripped leads and alligator clips
- Connect to Android tablet or phone
Nexus 7 tablet hardware:
- Good idea to create a Google account for your group with a shared password known by all group members before first boot: https://www.google.com/accounts/NewAccount
- To connect to AirBears, cancel the initial account setup by powering the tablet off, powering it back on, then exiting the Gmail setup. Now you can launch a full web browser and connect through AirBears with browser-based authentication.
Download a Java 6 Runtime Environment if you don't have it yet
Oracle's JRE and JDK downloads are here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Apple's Java updater for OS X Lion is here: http://www.macupdate.com/app/mac/39490/apple-java-for-os-x-lion/
Note that Android does not play will with Java 7 on OS X - download Java 6.
Download Eclipse if you don't have it yet and the Android SDK
- Windows: Install Eclipse Indigo or newer Download from eclipse.org | Local mirror
- Mac OS X: Install Eclipse Indigo or newer (32bit; problems reported with 64bit): Download from eclipse.org | Local mirror
Install Android SDK and Eclipse Android ADT Plugin
- Windows: Install Android SDK v20: Download from Google | Local mirror
- Mac OS X: Install Android SDK v20: Download from Google | Local mirror
- Then follow the installation instructions at the Google Android Developer site.
- For the Nexus 7, you'll want to install Android 4.1 (API Level 16). To compile the examples that ship with IOIO, you'll want to install Android 2.3.3 - API Level 10. For your own phone, you'll have to check your specs.
Import the IOIO Library
Load an example Application
- To load a compiled and packaged apk file, enable USB debugging on your device (in Settings-Developer settings), connect it, and use the adb tool, which is installed (on OS X) in android-sdk-mac_86/platform-tools:
./adb install ~/Downloads/App-IOIO0324/HelloIOIO.apk
- The "HelloIOIO" application just blinks the on-board LED.
- To compile an Android app and load it onto your board, follow instructions in Ch. 2 of Simon Monk's book on IOIO.