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
Post a Comment