Thursday, March 25, 2010

DropBox for Android

Screenshots and info is now online (
DropBox is coming to all flavors of Android "in a couple of months". It will allow for offline viewing, editing, streaming MP3 straight from DropBox, etc.

Monday, March 22, 2010

Android development

Here are a few quick steps to get started. These steps don't include native development (i.e. C/C++) using the NDK.

  1. Download JDK (jdk-6u18-windows-x64.exe)
    • Install JDK to C:\Java\jdk1.6.0_18
    • Install JRE to C:\Program Files\Java\jre6
  2. Download Ant (
    • Unzip to C:\Java\apache-ant-1.8.0
    • Add C:\Java\apache-ant-1.8.0\bin to PATH env var
    • Set env var JAVA_HOME=C:\Java\jdk1.6.0_18
    • Set env var ANT_HOME=C:\Java\apache-ant-1.8.0
  3. Download Android SDK (
    • Unzip to C:\android-sdk-windows
    • Add C:\android-sdk-windows\tools to PATH env var
  4. Install Android SDK components
    • Run C:\android-sdk-windows\tools\SDK Setup.exe
    • Install Install Android 2.1, docs, usb driver, Android 2.1 SDK and docs
    • Add Android Virtual Device (AVD) called "MyVirtualAndroid"
  5. Install USB driver
    • Use Device Manager -> Nexus One -> Update driver
    • Browse to C:\android-sdk-windows\usb_driver (enable recursive search)
  6. Create Android project
    • Open cmd prompt in new empty project folder (e.g. C:\Dev\Android\Hello)
    • Type "android list targets" and see what id number the Android 2.1 target is (1)
    • Type "android create project --target 1 --name MyAndroidApp --path . --activity MyAndroidActivity --package com.example.myandroid"
    • Check that the folder now contains a bunch of new files and sub-folders
  7. Compile
    • From the project folder, compile with "ant debug" (signed with debug key) or "ant release" (unsigned and will not run on the device until it's been signed)
  8. Run on emulator
    • Launch emulator with "emulator -avd MyVirtualAndroid"
    • Install app with "adb install -r bin\MyAndroidApp-debug.apk"
      • May have to run it twice if the daemon wasn't running
      • You can check if the daemon is running by typing "adb root" or "adb devices"
    • Launch app within the emulator (should show up as an app icon)
  9. Run on Android device
    • Connect Nexus One via USB cable
    • On the device: Settings -> Applications -> Development -> Enable debugging
    • Verify connection by typing "adb devices"
      • Make sure the attached device is the only one in the list (close the emulator if it's running)
    • Install app on device: "adb -d install -r bin\MyAndroidApp-debug.apk"
    • Launch app on device (shows up as a regular app icon)

Have fun!