android - Should I use Sqlite -


first have not done before , application sqlite i'm developing similar survey project.i want save string array user's questions answered , integer array answer(there 5 choice , saving array 0,1,2,3,4) when user closes project. should use sqlite?is there more logical way?

i "no", if stuff you're saving pretty simple.
use sqlite in case need relationalship or "complex" query. in case can store in sharedpreferences (if can tell example can guide you).

you can consider write file object (a map, or list, or whatever), or saving json.

file file = new file(context.getdir("data", context.mode_private), presets); objectoutputstream outputstream = new objectoutputstream(new fileoutputstream(file)); outputstream.writeobject(myobject); outputstream.flush(); outputstream.close(); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -