Question

I am trying to develop an application one of whose features is a survey form. This survey could change from time to time. So I thought, the best way to go about it would be to notify the user of a newer version of the survey and let him download it as a text file. Once downloaded, I would process the text file for some pre-defined tags and then load it as a survey form on to his screen with multiple text fields and textviews. Are there any sample codes available that show how we can code these different tags that can processed later before showing a survey scroll view.

For example: I can have [Question] for a textview and [Empty] for a textfield and [Multiple] for a multiple choice answer possibility. Similarly [[Start]] and [[End]] for starting and ending the text to be processed.

I have tried to search online for better methods of doing this. I came across this question where a webview is suggested, but I need the survey to be available offline so the user could save his answers and continue/change them later.

Was it helpful?

Solution

You should probably use 1 of the many standard formats used to store and manage data like XML:

<Question text="What is...?" /> 

for a basic user input question

<Question text="What is...?">
  <Answer text="Option 1">
  <Answer text="Option 2">
</Question>

for a multiple choice question

etc.

OTHER TIPS

I don't know of any open source projects with text files, but there is an open source library that allows you to create a editable PDF. You can take a look at that and see if this library offers you what you are looking for. Anyway here is the link:

http://fastpdfkit.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top