Changes between Version 18 and Version 19 of DeveloperGuidelines/Mobile/Android
- Timestamp:
- 12/16/10 07:55:04 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Mobile/Android
v18 v19 1 == Downloading and compiling ODK Collect, an Android XForms client == 1 [[TOC]] 2 = Android Development Environment = 3 ODK Collect, an Android XForms client 2 4 3 Using Windows syntax since if you know *nix you'll understand the windows command line. 5 = Download Code = 4 6 7 Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial] 8 * defaults will suffice during setup 9 10 Get a local copy of the [http://code.google.com/p/opendatakit/source/list?repo=collect ODK Collect trunk] with this command: 11 {{{ 12 hg clone https://collect.opendatakit.googlecode.com/hg/ opendatakit-collect 13 }}} 14 15 jaxdroid has a tree with some changes essential for Sahana here (unmaintained, needs merging with Trunk): 16 * http://code.google.com/r/jaxtrx-edenodkcollect/ 17 {{{ 18 hg clone https://jaxtrx-edenodkcollect.googlecode.com/hg/ jaxtrx-edenodkcollect 19 }}} 20 21 Another tree with some useful enhancements is here: 22 * http://code.google.com/r/jaxtrx-edenodkcollect/ 23 {{{ 24 hg clone https://jaxtrx-edenodkcollect.googlecode.com/hg/ jaxtrx-edenodkcollect 25 }}} 26 27 == Build == 5 28 1. Install [http://java.sun.com/javase/downloads/widget/jdk6.jsp Java JDK] 6 29 2. Install [http://developer.android.com/sdk/index.html Android SDK] … … 9 32 * Download and extract Ant (1.8.1 at time of writing): http://ant.apache.org/bindownload.cgi 10 33 * Create 'ANT_HOME' environment variable. 11 * Add '%ANT_HOME%\bin' directory to 'PATH' environment variable. 12 === Clone "Collect" source from repository === 34 * Add '%ANT_HOME%\bin' directory to 'PATH' environment variable (Windows syntax). 35 4. Install [http://www.eclipse.org/downloads/ Eclipse] (tested with 3.6.1) 36 5. Install [http://developer.android.com/sdk/eclipse-adt.html Android plugin] 37 6. Import project into Eclipse (project name should avoid spaces) 38 7. Right-click on folder & 'Build Project' 13 39 14 Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial] 15 * defaults will suffice during setup 40 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. 16 41 17 Get a local copy of the [http://code.google.com/p/opendatakit/source/list?repo=collect opendatakit collect repository] with this command: 18 {{{ 19 hg clone https://collect.opendatakit.googlecode.com/hg/ opendatakit-collect 20 }}} 42 == Editing Code == 43 Follow the Build instructions above. 21 44 22 jaxdroid has a tree with some changes here: 23 * http://code.google.com/r/jaxtrx-edenodkcollect/ 24 {{{ 25 hg clone https://jaxtrx-edenodkcollect.googlecode.com/hg/ jaxtrx-edenodkcollect 26 }}} 27 === Editing Code === 45 Can Run or Debug in the [http://developer.android.com/guide/developing/tools/emulator.html Emulator] 28 46 29 1. Install [http://www.eclipse.org/downloads/packages/pulsar-mobile-java-developers/galileosr2 Eclipse 3.5] (3.6 has problems with the Android plugin) 30 2. Install [http://developer.android.com/sdk/eclipse-adt.html Android plugin] 31 3. Import project into Eclipse (project name should avoid spaces) 32 4. Run or Debug as desired (Tested on HTC Incredible SDK 3.0+ required) 47 Right-click on the project & select properties | Android to check the API revision used. 48 * Base ODK Trunk can run on basic Android 1.5: API 3 49 * [http://developer.android.com/reference/android/telephony/SmsManager.html SMS functionality] requires Android 1.6 (API 4) 33 50 34 Use an [http://developer.android.com/guide/developing/tools/emulator.html Emulator] if you do not have a phone connected via USB. 35 36 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), or use the configured Sahana Eden application downloadable from Android Market, enable accept self signed certificates to work with Sahana Eden demo site. 37 38 39 === References === 51 == References == 40 52 * ANT samples 41 53 * http://code.google.com/p/autoandroid/wiki/AndroidAnt