How I can create simple application same as ODK but not reading forms from server

Hi everyone,
Hope you are all doing well,

I'm trying to develop an android mobile application that can submit two or three textual answers, one GPS point and one image file to an OpenRosa compliant server(Ona.io personal account), exactly how ODK does.

Actually it's like ODK but not going to read any xls form from any server, the form/questionnaire structure should be coded inside the app and use forever. But, it certainly sends the data to a server like ODK does. It's a volunteer project which I'm going to launch.

Specific questions;

  • How should I create the questionnaire inside the application(no need to get from server)?
  • How should I generate the xml file from the entered data and store to odk directory?
  • How should I send the xml + media/instances to my Ona.io account(I know I've to have a form uploaded there and make that form inside the android app. but how should I send?)
  • Shall I save the data into SQLite database or xml will work out?
  • Do I need to send data from SQLite database or just send the xml+media/instances from odk directory from sd card?
  • Will the server accept only xml data or it accepts the other type of data like json as well?

Your help would be much appreciated :slight_smile:

Best regards,
Amin Sherzad

Hi @sheramin

I think you could just put your xml forms into assets and then copy them to /odk/form/ dir one the app is started for the first time. Please check out how we do that in our espresso tests

Thanks for the replay @Grzesiek2010. Will check it out and get back if I had any question :slight_smile: