J2ME client

J2ME client with multiple transport back end support (GPRS,SMS) supporting submission of form data for data collection on field.

Purpose

The J2ME client aims at enabling Sahana users to fill out the forms (missing persons reports etc) on their handheld/mobile phones and send the data via SMS/GPRS. Mobile phones are in widespread use in most parts of the world making this a quick and a cost efficient way of deploying data logging units in disaster prone areas. This serves the interest of emergency management community in enabling speedy data collection from field.

Current Status

ToDo

J2ME application user guide

Clock wise from the top: Form selection screen, Menu in form selection page, Settings page, Sample form view, Submission screen, Saved Forms.

Saved form screen details :

  • A red entry next to the saved forms shows a submit failure due to incorrect data.
  • A green entry shows successful submission.
  • A brown entry shows that the message transmission was in progress but never completed.
  • A white entry shows that the message was not submitted.

Form selection screen Settings Page Menu to access settings

 Sample form view  View Saved forms  Submission screen

Demo applications

Note: The demo currently does not validate the submitted email addresses, enter a unique address during testing.

Note: The SMS submit currently tries to submit to +919198539599 - Please send an email to lifeeth[at]gmail[.]com for SMS testing.

J2ME application development guide

The J2ME app derives its code from JavaRosa ( http://code.javarosa.org/ ) the code and its derivatives are licensed under the Apache License, Version 2.0

Installing the Development Environment:

1. Install JDK.

2. Install Sun Java Wireless Toolkit for CLDC.

3. Install J2ME-Polish v2.0.4:

4. Create a work directory ( All commands below will be within the work directory):

  • cd j2meapp/org.javarosa.sahana
  • Set the polish.home,j2mewtk.home and wtk.home variables in build.properties to match your install locations.
  • Test if the environment is properly setup by changing the device.identifier to Generic/DefaultColorPhone and executing “ant build” in the directory.
  • For creating a jar for deployment execute → ant BuildRelease

5. Refer to Jar signing for details on signing the application for deployment.

Customizations:

1. Add the xforms to the resources directory

  http://127.0.0.1:8000/eden/xforms/create/module_resource
  
  (replace 'module' & 'resource' as-appropriate)

2. Load the forms and the appropriate default configurations at the bottom of the file:

  j2meapp/org.javarosa.sahana/src/org/javarosa/sahana/midlet/JavaRosaDemoMidlet.java

3. Select the phone model by changing the device.identifier in build.properties

4. Android packages:

  • To create a package valid for android choose the following in build.properties
   device.identifier=Generic/AnyPhone_240x320
  • Build the corresponding jar file:
   ant BuildRelease

Navigation
QR Code
QR Code dev:j2meclient (generated for current page)