Changes between Version 18 and Version 19 of DeveloperGuidelines/Mobile/Android


Ignore:
Timestamp:
12/16/10 07:55:04 (14 years ago)
Author:
Fran Boon
Comment:

--

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 =
     3ODK Collect, an Android XForms client
    24
    3 Using Windows syntax since if you know *nix you'll understand the windows command line.
     5= Download Code  =
    46
     7Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial]
     8 * defaults will suffice during setup
     9
     10Get a local copy of the [http://code.google.com/p/opendatakit/source/list?repo=collect ODK Collect trunk] with this command:
     11{{{
     12hg clone https://collect.opendatakit.googlecode.com/hg/ opendatakit-collect
     13}}}
     14
     15jaxdroid has a tree with some changes essential for Sahana here (unmaintained, needs merging with Trunk):
     16 * http://code.google.com/r/jaxtrx-edenodkcollect/
     17{{{
     18hg clone https://jaxtrx-edenodkcollect.googlecode.com/hg/ jaxtrx-edenodkcollect
     19}}}
     20
     21Another tree with some useful enhancements is here:
     22 * http://code.google.com/r/jaxtrx-edenodkcollect/
     23{{{
     24hg clone https://jaxtrx-edenodkcollect.googlecode.com/hg/ jaxtrx-edenodkcollect
     25}}}
     26
     27== Build ==
    528 1. Install [http://java.sun.com/javase/downloads/widget/jdk6.jsp Java JDK]
    629 2. Install [http://developer.android.com/sdk/index.html Android SDK]
     
    932  * Download and extract Ant (1.8.1 at time of writing): http://ant.apache.org/bindownload.cgi
    1033  * 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'
    1339
    14 Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial]
    15  * defaults will suffice during setup
     40To 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.
    1641
    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 ==
     43Follow the Build instructions above.
    2144
    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 ===
     45Can Run or Debug in the [http://developer.android.com/guide/developing/tools/emulator.html Emulator]
    2846
    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)
     47Right-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)
    3350
    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 ==
    4052 * ANT samples
    4153  * http://code.google.com/p/autoandroid/wiki/AndroidAnt