Changes between Version 24 and Version 25 of DeveloperGuidelines/Mobile/Android


Ignore:
Timestamp:
12/17/10 09:22:44 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Mobile/Android

    v24 v25  
    5454<string name="main_menu_message">Sahana Eden</string>
    5555}}}
     56
     57=== SMS Structure ===
     58XForms 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:
     59 * (1/3)(12345)<?xml version='1.0' ?><pr_person>...
     60 * (2/3)(12345)last_name>...
     61 * (3/3)(12345)-08</date_of_birth></pr_person>
     62
     63The unique identifier -- here, 12345 -- is actually significantly more random than that.
     64
     65These 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.
    5666== References ==
    5767 * ANT samples