GPRS-based Reporting using OpenRosa tools
The OpenRosa Toolkit
Tools provided by the members of the OpenRosa consortium enable the developer to create mobile applications that transfer data using GPRS, which is often cheaper than using SMS. The following primer shows the steps to create an application using these tools. Kudos go to the creators of the Using Javarosa page, which provided the original inspiration for this page.
Designing the Form
The form may be created using an XForms builder (more information from https://bitbucket.org/javarosa/javarosa/wiki/UsingJavaRosa) called ODK Build - A designer that creates fairly simple forms in a user friendly manner. If you need complicated skip logic, it may be coded manually. Once the form is ready, you go to File -> Export to XML and select and copy the form code (from <h:html.. to the final </h:html> - don’t include "Output XML") and save the results to a new file (e.g. weeklyreport.xml)
Scrrenshot of ODK Build:
Testing the Form
You may test the form using Dimagi's XForms Player.
Setting up the Server
If the application privacy specification permits hosting the data on Google, setup a Google appspot instance and install ODK Aggregate, using the Installing an App Engine Instance instructions. There are also instructions for setting up a local instance of ODK Aggregate in case the data must stay local.
The link from the ODK wiki points to a slightly older version of ODK Aggregate. The most recent version of ODK Aggregate may be downloaded from http://code.google.com/p/opendatakit/downloads/detail?name=ODK%20Aggregate%20v0.9.4.zip
Upload the form to the server.
Using JavaRosa to Enter Data on the form
Download JavaRosa from the Dimagi website. The location for the download may change; here is where I found it: http://build.dimagi.com:250/guestAuth/downloadArtifacts.html?buildTypeId=bt2&buildId=lastPinned
Unzip the file. There are different versions of the application depending on the phone. The Generic/International version may work fine for your model. Bluetooth (or x-fer via USB) the JavaRosa.jar and JavaRosa.jad files to your phone. On the phone, open JavaRosa. Go to Options -> Settings. Enter the following settings to view forms and submit data to the server:
- Form Fetch Server: http://yourappname.appspot.com/formList
- Form Submit URL: http://yourappname.appspot.com/submission
Click Done. In the Available Forms listing, click "Download New Forms." This should download the new form. Once it has downloaded you should be able to enter and submit data.
Viewing and Exporting Data
From your PC, go to the location of your ODK Aggregate instance (http://yourappname.appspot.com).
You may view submitted data or export to .CSV, which can be opened in Excel or imported into Access.
Integration with FrontlineSMS
If you application supports sending data via SMS if GPRS is not available, you may integrate FrontlineSMS with ODK Aggregate so that data from SMS' may be collected on ODK Aggregate.
Downloads
Javarosa
Mobile application
A custom version of Javarosa data client may be downloaded. This version features the ability to use SMS if GPRS is not available for data transmission. This version is based on a fork of javarosa-pending and is available here. This version also features the ability to set the number of tries after failure and delay between tries in the Settings menu. There is a description of the changes in this fork.
File: ictedge.org-javarosa-dist.zip, 2.75 MB Unzip and transfer these files to your mobile phone. To make configuration a little easier, change the Form-Server-Url and JRDemo-Post-Url in the .jad file to point to your server before installing it on your mobile phone - or - change them from the Settings menu in the app.
Source
The source for this version of the JavaRosa mobile application is available at http://bitbucket.org/ckelley/javarosa-pending .
Forms
Forms that demonstrate the ability of this custom version of Javarosa's ability to switch to another data trnasfer method (SMS). These will probably only work in the custom version of Javarosa linked above.
- File: weeklyReportCommon.xml - Uses GPRS and SMS submission types and deviceID.
- File: weeklyreportMulti2.xml - Uses multiple submission types (GPRS and SMS); points to invalid URL to force handover to SMS.
- File: weeklyreportSms2.xm - Uses a single SMS submission type.
- Login to post comments
- Printer-friendly version
- PDF version