Changes between Version 28 and Version 29 of DeveloperGuidelines/Mobile/Android
- Timestamp:
- 06/14/12 17:05:05 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Mobile/Android
v28 v29 1 = Android Developer Guidelines = 1 2 [[TOC]] 2 = Android Developer Guidelines =3 ODK Collect, an Android XForms client4 3 5 == Download Code == 4 == Japan Client == 5 Uses REST services to talk to Sahana back-end. 6 6 7 Available in Japanese only. 8 9 Only 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 == 18 An Android XForms client 19 20 === Download Code === 7 21 Install yet another SCM tool, [http://mercurial.selenic.com/downloads/ HG Mercurial] 8 22 * defaults will suffice during setup … … 24 38 * ''link pending'' 25 39 26 == Build==40 === Build === 27 41 1. Install [http://java.sun.com/javase/downloads/widget/jdk6.jsp Java JDK] 28 42 2. Install [http://developer.android.com/sdk/index.html Android SDK] … … 39 53 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. 40 54 41 == Editing Code==55 === Editing Code === 42 56 Follow the Build instructions above. 43 57 … … 49 63 * Does it fail gracefully on older API? (does compile at least still) 50 64 51 === Branding===65 ==== Branding ==== 52 66 See [http://code.google.com/r/jaxtrx-edenodkcollect/source/detail?r=88a389069d961e777405ae34a55991e8a3d2f438 jaxdroid's branch]: 53 67 * Edit {{{/res/values/strings.xml}}} … … 59 73 }}} 60 74 61 === Testing===75 ==== Testing ==== 62 76 Can 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. 63 77 {{{ … … 65 79 }}} 66 80 67 === SMS Structure===81 ==== SMS Structure ==== 68 82 XForms 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: 69 83 * (1/3)(12345)<?xml version='1.0' ?><pr_person>... … … 74 88 75 89 These 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 === 77 91 * ANT samples 78 92 * http://code.google.com/p/autoandroid/wiki/AndroidAnt