[[TOC]] = Android Development Environment = ODK Collect, an Android XForms client = Download Code = Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial] * defaults will suffice during setup Get a local copy of the [http://code.google.com/p/opendatakit/source/list?repo=collect ODK Collect trunk] with this command: {{{ hg clone https://collect.opendatakit.googlecode.com/hg/ opendatakit-collect }}} jaxdroid has a tree with some changes essential for Sahana here (unmaintained, needs merging with Trunk): * http://code.google.com/r/jaxtrx-edenodkcollect/ {{{ hg clone https://jaxtrx-edenodkcollect.googlecode.com/hg/ jaxtrx-edenodkcollect }}} Another tree with some useful enhancements from NCSU is here: * http://code.google.com/r/vinbitr-gps-images-new/source/list {{{ hg clone https://vinbitr-gps-images-new.googlecode.com/hg/ vinbitr-gps-images-new }}} == Build == 1. Install [http://java.sun.com/javase/downloads/widget/jdk6.jsp Java JDK] 2. Install [http://developer.android.com/sdk/index.html Android SDK] * Download some platforms using the SDK Manager 3. Install ANT, a cross platform Java build automation tool. * Download and extract Ant (1.8.1 at time of writing): http://ant.apache.org/bindownload.cgi * Create 'ANT_HOME' environment variable. * Add '%ANT_HOME%\bin' directory to 'PATH' environment variable (Windows syntax). 4. Install [http://www.eclipse.org/downloads/ Eclipse] (tested with 3.6.1) 5. Install [http://developer.android.com/sdk/eclipse-adt.html Android plugin] 6. Import project into Eclipse (project name should avoid spaces) 7. Right-click on folder & 'Build Project' To deploy you'll need to create a self signed keystore and use the .apk packaging wizard (Right-click on project, menu Android tools, Export Signed Application Package), or use the configured Sahana Eden application downloadable from Android Market, enable accept self signed certificates to work with Sahana Eden demo site. == Editing Code == Follow the Build instructions above. Can Run or Debug in the [http://developer.android.com/guide/developing/tools/emulator.html Emulator] Right-click on the project & select properties | Android to check the API revision used. * Base ODK Trunk can run on basic Android 1.5: API 3 * [http://developer.android.com/reference/android/telephony/SmsManager.html SMS functionality] requires Android 1.6: API 4 == References == * ANT samples * http://code.google.com/p/autoandroid/wiki/AndroidAnt * http://www.disgruntledrats.com/?p=27 ---- BluePrintMobileClient UserGuidelinesMobile