Creating dynamic forms (best approach)

I need to develop an application for Android Tablet. This will do the following:

I will connect to the web service to get a dynamic list of forms. These forms must be downloaded to fill them offline. When one or more forms are filled out and the application is connected to the network, the user can send them to the server by clicking the button.

These forms will be dynamic. There is no predefined form. And they will have one or more photos.

My problem is that I do not know how to do this.

I thought:

  • I could send the form as a set of fields and their types. As soon as I download the xml from the web service, I will have to rebuild it to show it to the user.

  • Submit the html page using the form.

  • HTML5 (using PhoneGap).

  • ...

I think the second option is the best. What do you think?

Once a user has filled out a form, how can I save her data? If I use a webpage, I think I can save it as a CSV.

The first option will be the native android interface, so I could save it to SQLite or as a txt file. How to save completed forms?

And then, when the user returns to the network, how can I send the txt file and image via the web service?

If you have a different approach, you can share it.

+5
source share
1 answer

I would choose option 1 as it has a more natural feeling ...

: : Forms (id, name...), FormItems (id, formid, name, type, order...), Data (id, FormItemsid, EntryId, value...), ( id, dateadded, ...)

, , FormItems formid ( LinearLayout (: ) addView )

, , formitems Data​​p >

, , , .

, !

+3

All Articles