ANDROID APP:
Short Desc: Basic application to send information from forms, with a Offline mode.
We hace an App that loads a web with a form link, Web based, user fill form, submit, fill form, submit. (surveys)
The problem lies when there is no internet or very poor, so we basically, need the same, but that can work OFFLINE, say store each form locally, so it can be sent to the server when internet is alive.
The app, should store all submitted forms, and mark as “sent”, the ones that were successfully sent to the server.
Then, what buttons should the app have? (Eg. A side slide)
1 Send data
2 Review Data
3 Clear Data
4 Restart
5 Quit
1) would be responsible for uploading the forms that were saved offline.
2) would be a place to see, how many forms are stored on the phone, with some identifier like SurveyID** and Date/Hour. and if was or not uploaded already, not need to show the data captured in any way.
3) would simply be a button that would send to the beginning (homepage of the app should ONLY if online. )
4) completed erase data (only the already sent forms can be cleared)
5) Only to exit the app.
This works as follows, there is a homepage which is set in the application as default (internal in the app, not user configurable), there, we will find one or more links to Surveys that can be done. (could be one, two or none). The app, should keep in cache this page for in case there is no connection, until it can get a fresh version of the app. Because from this page is where the user will need to select what survey they need to make. And this, is managed from another software that makes the surveys. It is important to keep the last full page cache of this one, for when there is no connection, or someone restarts and it give some error, he will loose access to use the system offline.
Well, in this page, we will have one or more links (or no one if no active surveys).
Once you click on one of this links, you are already inside a survey. To identify from the app, when you are in a survey, and what survey you are in, its easy, you can read input fields of the form like this one :
<Input type = "hidden" name = "fieldnames" value = "861928X12X19 | 861928X12X20 | 861928X11X16 | 861928X11X17 | 861928X13X22 | 861928X13X21" id = "fieldnames">
There for example, you have all the fields we need to keep in the “value”, as you see, they are 6 ones.
Also, you can see important information there, most important one is the SurveyID is the number that all have before the first “X”, in this case 861928.
Later, maybe not so important, is the group ID (12, 11 and 13) and later, the question ID (19, 20, 17, 22, 21).
Then of course, there are all the input fields with options, or even hidden fields, we need all of this saved, to be sent when online (entire form).
So, basically… we need the application "take" this page, for use offline. You should maybe change the form "action", to a function of the application to do the following:
Save the information locally on the phone, indicating that this set of questions belongs to what surveyID, and date&time to identify.
It can just send the information to the server normally if there are a good data connection (or wifi), and mark them as “Sent” on the phone.
If there is no data, it should only save on the phone, mark as “not Sent”, and if app detects internet, it could silently send the various completed forms and mark them as “sent".
Try to Send all the “not yet sent” forms when the “Send Data” button is used, and in this case provide a report (ie. 16 of 16 surveys sent … or Error…etc)
The Clear Button, should erase all data, ONLY the already SENT data, it should NOT delete data which was not sent to the server.