Changes between Version 28 and Version 29 of DeveloperGuidelines/Mobile/Android


Ignore:
Timestamp:
06/14/12 17:05:05 (12 years ago)
Author:
Fran Boon
Comment:

Japan Client

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Mobile/Android

    v28 v29  
     1= Android Developer Guidelines =
    12[[TOC]]
    2 = Android Developer Guidelines =
    3 ODK Collect, an Android XForms client
    43
    5 == Download Code  ==
     4== Japan Client ==
     5Uses REST services to talk to Sahana back-end.
    66
     7Available in Japanese only.
     8
     9Only works with the code used for the [wiki:Deployments/Japan2011 Japan Deployment].
     10
     11* Download: https://play.google.com/store/apps/details?id=org.sahanafoundation.sahana
     12* Code: http://bazaar.launchpad.net/~sahana-eden-jp/sahana-eden/sahanaAndroid/files
     13 * Function Names & Comments are in English. Dev docs in Japanese, but could be translated if there is interest.
     14* Japan-customised Sahana: http://bazaar.launchpad.net/~sahana-eden-jp/sahana-eden/iwate/files
     15* Demo: http://japan.sahanafoundation.org
     16
     17== ODK Collect ==
     18An Android XForms client
     19
     20=== Download Code  ===
    721Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial]
    822 * defaults will suffice during setup
     
    2438 * ''link pending''
    2539
    26 == Build ==
     40=== Build ===
    2741 1. Install [http://java.sun.com/javase/downloads/widget/jdk6.jsp Java JDK]
    2842 2. Install [http://developer.android.com/sdk/index.html Android SDK]
     
    3953To 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.
    4054
    41 == Editing Code ==
     55=== Editing Code ===
    4256Follow the Build instructions above.
    4357
     
    4963  * Does it fail gracefully on older API? (does compile at least still)
    5064
    51 === Branding ===
     65==== Branding ====
    5266See [http://code.google.com/r/jaxtrx-edenodkcollect/source/detail?r=88a389069d961e777405ae34a55991e8a3d2f438 jaxdroid's branch]:
    5367 * Edit {{{/res/values/strings.xml}}}
     
    5973}}}
    6074
    61 === Testing ===
     75==== Testing ====
    6276Can use Curl to submit the XForms to the server to easily be able to step though in Eclipse without needing to have a Public IP reach your PC or use the emulator.
    6377{{{
     
    6579}}}
    6680
    67 === SMS Structure ===
     81==== SMS Structure ====
    6882XForms sent via SMS are split into Multi-Part messages with a sequence header. This header is currently a custom 5-digit unique identifier for that particular form submission.  That sequence information and unique identifier are prepended to the each part of the multi-part SMS transmission by the modified ODK Collect branch's SMS form submission code.  It will look something like this:
    6983 * (1/3)(12345)<?xml version='1.0' ?><pr_person>...
     
    7488
    7589These messages are then reassembled by the {{{tropo()}}} function in {{{controllers/msg.py}}} which calls {{{concatSMS(lastMessage, fromaddress)}}}. The reason the tropo() controller method calls concatSMS() with each new part of a multi-part message is that the messages may arrive out of order.  However, when the concatSMS() method detects that all message parts of that XForms submission have been received, it will stitch those messages together (while removing the prepend), and submit them to parserdooth() as for normal messages.
    76 == References ==
     90=== References ===
    7791 * ANT samples
    7892  * http://code.google.com/p/autoandroid/wiki/AndroidAnt