Popular Help ContentNo popular content.
- Create a hidden variable named sms_message. Populate it with the text string that should appear in the message body.
- Create a hidden variable named sms_addresses. Populate it with the comma-separated list of phone numbers of the intended recipients.
- Insert the SMS-message sending question using the following steps:
- Insert an Android App Callout question, by going to Add Question > Advanced > Android App Callout.
- Open the form's XForms XML file, by going to the Form Builder Menu > Edit Source XML.
- Search for: 'odkx:intent' to find the instance of the Android App Callout question that you added above.
- Delete what is there, and replace it to match the example below. The "button-label" and the "data" attributes in particular for the "odkx:intent" element currently can only be set in XML. Pay special attention to ensure that
- Update each of the following variables with content that matches what you would like to use:
- "Send SMS"
- => Change this to the label you would like to see on the SMS Button
- => Change this to the full path of the hidden variable that contains a comma-separated list of phone numbers
- message => Change this to the full path of the hidden variable that contains the content of the message being sent
<odkx:intent xmlns:odkx="http://opendatakit.org/xforms" id="send_sms" class="android.intent.action.SENDTO" button-label="Send SMS" data="cc:xpath_key:concat('smsto:', /data/sms_addresses)"> <extra key="sms_body" ref="/data/sms_message" /> </odkx:intent>