Wednesday, October 8, 2008

JavaRosa MIDP Demo

In collaboration with JavaRosa, an OpenRosa java implementation which supports XForms for J2ME, we have migrated Mesh4J to J2ME and an experimental version is available here: Mesh4j2me Demo.

The main idea is to provide mesh capabilities allowing mobile phones to share XForms definitions and data.

This demo requires a mobile phone MIDP 2.0 and CLDC 1.1 compatible. I've tested it in a Sony Ericcson 950i and a Sony Ericcson 750i.

First of all, please install the MIDP in your phone. Now, you are ready to start the application.

The following steps will show you how to use the application:

 

1. Launch application (MIDP)

 image

2.  According to the phone model – Java will ask for authorization to send SMS

image

3. JavaRosa initialization and login (user admin)

image image 

image

4. Now, we need to configure the Mesh4X properties with the "Settings" menu option

image

Enter the base url for sync, in this example the InSTEDD feed sync server url: http://sync.instedd.org/Service.svc/feeds/

 image

 

Enter the default mobile phone number to synchronize data with sms protocol.

image

Please press the Done button to save your changes.

5. Add new form data: First select the Xform and next click the "Select" menu option

image image

The default behavior of java rosa xform editing UI is to send the form to the default transport method defined in java rosa. Because we'll be synchronizing the data over mesh4x, we don't need to submit the data at this point, so you can simply select "Send Later".

image

6. Now, we can view and edit the data previously entered. First select the xform and next click the "View Saved" menu option

image

The XformList UI shows all saved forms

image

 

You can use the "Select" menu option to select a form instance data to edit or delete.

image image

7. SMS synchronization: First select the Xform and next select the "Sync Data - Sms" menu option

image 

Depending on the phone model – Java will ask for authorization to send SMS

image

A "Console" view will show up with all sync messages. We can view the messages by Protocol (high level) or sms (low level) perspectives. The console is persisted in the phone rms storage, if you select the option "Clean", all sync messages are deleted from the storage.

image

 

The "End Sync" message indicates that the synchronization has finished.

image

So far we can enjoy java rosa with mesh!

 

8. Other features

  • Sync – Console
    • shows console view
  • Sync data – HTTP
    • mesh via Http the selected form with the default sync URL (Mesh4xDefaultBaseURL, see settings, for this example the InSTEDD sync site url)
  • Sync data – SMS
    • mesh via SMS the selected form with the default sms number (Mesh4xDefaultSMSTarget property, see settings)
  • Sync – Delete sync
    • delete sync information
  • Sync – Delete def/data/sync
    • delete sync information and xfoms data and definitions
  • Sync – Cancel sync
    • cancel the current sync for the selected form
  • Sync – Force Retries – SMS
    • retries pending messages (messages with pending ack)
  • Sync - Import def - Http
    • import xform definition from the default sync discovery url (Mesh4xDefaultDiscoveryURL, see settings, for this example we added to the InSTEDD sync site a feed with 2 xform definitions named XFormDemo1 and XFormDemo2, http://sync.instedd.org/Service.svc/feeds/XForms)
  • Sync - Import def - SMS
    • feature under construction, import xform definition from other mobile form.

 

image image

 

That's all folks !!!

Future posts.... Coming soon...

Kml Demo - pc client

Kml/SMS Demo - pc client

SyncEngine under the hood

How to create a new SyncAdapter

Adapters: FeedSyncAdapter

Adapters: HttpSyncAdapter

Adapters: SplitAdapter

Adapters: KmlAdapter

Adapters: HibernateAdapter

Adapters: MSAccessAdapter

Adapters: JavaRosaAdapter

Asynchronous sync

MessageSync Protocol

Sms channel

0 comentarios: