eCollect - Offline Web Client
Use case scenario
eCollect is an offline-data collection client, which was designed for people who want to use smart phones, tablets or netbooks to collect data in the field. Using eCollect, a user can download forms, fill in forms while offline and then sync the system to OpenXdata server, whenever they have connectivity. eCollect offers some advantages for the user who is not looking for a low cost data collection solution. The form is shown in the same layout as it was designed, giving a better interface for filling in the forms.
eCollect stores data on the local-storage of the browser, thus allowing it to run on all HTML5 compatible browsers. It has been thoroughly tested on Firefox, Chrome, Android default browsers and is expected to run on others like Safari, iPhone, iPad etc. Since it stores data in the local-storage, the limit allowed for storing data is dictated by the browser in which the app is run. In most cases, this limit is 5 MB. You can go to this link to test and find out how much space is available in your particular browser:
eCollect has also been compiled as a native android application (.apk format) and widely tested on the Android platform. This file will shortly be uploaded which can be run on android tablets and smartphones.
eCollect was created as a fork out of Emit, the wonderful interface designed for online data entry and auditing on OpenXdata.
1. Tutorial for getting started with eCollect (Offline web-client)
1.1 Instructions on running OXD for eCollect
Now you can run eCollect with the latest OpenXdata server with the following steps:
1. Drop the eCollect servlet jar file in OpenXdata webapp/war/WEB-INF/lib folder.
2. Add the following to web.xml in your OpenXdata server webapp:
<servlet> <servlet-name>ecollectdownloadservlet</servlet-name> <servlet-class>org.openxdata.server.servlet.EcollectDownloadServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ecollectdownloadservlet</servlet-name> <url-pattern>/OpenXDataServerAdmin/ecdownloadservlet</url-pattern> <url-pattern>/ecdownloadservlet</url-pattern> </servlet-mapping>
3. Run your OpenXdata server, be it code or war file. Do make sure that OPENXDATA_SETTINGS.properties point to the correct username, password and your database name for running the OpenXdata admin interface. Now your OpenXdata server is ready to communicate with eCollect for downloading forms, uploading data.
1.2 Instructions on running eCollect
You can check out the code from the following svn link: https://svn.openxdata.org/Experimental/eCollect/trunk
Just download the code, and move to the downloaded directory on the command line and give the following mvn command (You need maven installed):
2. Tutorial for running eCollect (Android app)
In order to run eCollect Android app, the user needs to generate and deploy 2 war files for OpenXdata and eCollect. Please follow the instructions given below:
1. Please follow 1.1 Instructions on running OXD for eCollect, and deploy the OpenXdata war file.
2. Please follow 1.2 Instructions on running eCollect for checking out the eCollect code and give the mvn command for generating a war file:
mvn clean install
Once both the war files are generated, you can deploy them on a servlet container like tomcat.
3. The android apk has been generated and attached to this document. You can download the EcollectAndroid.apk here, and put it either on an android device or an android emulator and run the application.
When you open the eCollect application, you will see a login screen containing a button called 'eCollect url'.
Clicking on the button will give another window asking for 2 entries. These 2 entries are the url connection to eCollect server.
Mobile Module Url: Contains the first part of the connection url. eg.
Since android treats localhost as 10.0.2.2, and if your eCollect war file is deployed on localhost on port:8888, then the url should be given as:
Mobile Relative Service Url: This contains the rest of the url apart from the hostname and the port number. It will have the following format:
So, if the name of the war-file is ecollect-2.0-SNAPSHOT, then Mobile Relative Service Url will be:
Once the eCollect url has been changed and saved, it will be stored in the database and need not be changed again. To run the eCollect. please follow the tutorial given next.
Tutorial on how to use eCollect
When you run the eCollect code or deploy the war file and open it, you will get a login screen.
Since there are no users downloaded to your offline system, when you enter a username and password, you will be taken to a screen where you will be asked to give the HTTP URL for the OpenXdata server to connect to, from where, the current user will be downloaded.
You can change the HTTP settings from the default to point to the your OpenXdata server - say your openxdata war file named admin-1.3-eCollect.war is deployed on localhost:8080, you will be giving the following http url:
Once you are authenticated on the main OpenXdata server, that user will be downloaded locally and from now on, you will be able to login without having to connect to OpenXdata server again, of course, till the time you want to login as a new user.
Once you are past the login screen, you will see the Forms List which will probably be empty the first time you open it. You can click on 'Download Forms' to download the forms from the same OXD server, or click on 'HTTP settings' to change the settings and attempt the download from the changed URL.
Once the forms mapped to the user are downloaded, you can start collecting data.
You can collect data while offline and also view/edit/delete collected Form Data on the local system. You need connectivity only once you are ready to upload all your data. For uploading data, just click on 'Upload Data' and your data will be uploaded to the OpenXdata server and uploaded data will be deleted from the local database.
Important features implemented
- Save As Draft option on data entry - this feature will help the data collector in saving the form as an incomplete draft, so that it can be opened again and completed at a later date (Incomplete forms will never be uploaded to the server unless they are finished)
- True offline nature (according to HTML5 specifications), needing only connectivity for downloading forms or uploading collected data.
- Multimedia in eCollect is not supported within the browser, but it will work on Android apk (provided there is camera available on the device).
- eCollect will be enhanced for downloading and uploading work-items so as to use workflows within the data collection system.
- eCollect_login.png (7.7 KB) - added by raghu.mittal@… 3 years ago.
- login_main_server.png (13.3 KB) - added by raghu.mittal@… 3 years ago.
- form_list.png (31.6 KB) - added by raghu.mittal@… 3 years ago.
- form_responses.png (48.2 KB) - added by raghu.mittal@… 3 years ago.
- http_settings.png (42.6 KB) - added by raghu.mittal@… 3 years ago.
- data_capture.png (31.6 KB) - added by raghu.mittal@… 3 years ago.
(6.7 KB) - added by rmittal
10 months ago.
eCollect servlet jar file
(2.8 MB) - added by rmittal
9 months ago.
eCollect android apk file
(7.4 KB) - added by rmittal
9 months ago.
Login screen with eCollect url button
(11.3 KB) - added by rmittal
9 months ago.
eCollect server url window