10-18-2011 06:57 AM - edited 10-18-2011 08:28 AM
I have a list field which contains questions in the first screen and i am passing the selected index of the list to the second screen i am parsing JSON according to the question id. I am parsing the answers for the questions. The question will be 2 types such as single answer and multiple answer. I am displaying a array of Radio button field for single answers and a array of Checkbox field for multiple answers. Now if the user selects the answer, i need to store it temporarily and i should show him the answer which he selected when he selects the same question. I don't have idea in this. can any one guide me in this ?? I want to try with sqlite ?? how to do ??
10-18-2011 07:08 AM
Do you need to permanently store this data? if the device has restarted will the user expect the data to still be there?
If not just store the answers in a data object that is retained by your Application.
If persistence is required, then try this tutorial. You will find other informaiton if you search for persistent.
10-18-2011 07:17 AM
10-18-2011 08:34 AM
While you could use RMS or SQL to do this, I think the easiest option is either PersistentStore or RuntimeStore. The choice of these will depend on whether you want the data to survive a device restart - battery out or app install type restart, not just the normal 'standby' power down. if you want the data to survive the device restart, then you will need to use PersistentStore. If not, RuntimeStore. The article I linked you to explains both I think.