Save content to your phone

Asked

Viewed 48 times

0

I am making an application, where I have a list of questions, and if the user leaves the application or screen, I would like to save the questions he already answered, so when he goes back to that form, the answered questions will be saved in memory.

To do this, what would be the best option, SharedPreferences or InputStrem?

  • I believe the best option is the local data flock, SQLITE

  • But I didn’t want to save everything, because the form will be incomplete, only after I saved all the information, IE, that the user answered all the form so I would save in sqlite.

  • And there is the option to save the form as it is answered in Sqlite? When the user finishes the questionnaire, assign "FINISHED" to a field of the questionnaire structure.

  • Using Sharedpreferences Android will be recording in Sqlite. The difference is that who controls it is not you. How many distinct questionnaires completed or in progress could you have? Sharedpreferences does not serve these cases. Inputstream?? Doesn’t have the function you seemed to assign him.

1 answer

1

I think storing data in Sharedpreferences is not a good idea. Instead, save the progress in a local database, Sqlite. Then when log in again just bring what has already been answered.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.