Which is the right place to store data for a wizard-like application?
my application consists of < 10 activities, which cover the wizard part. Each of these activities should collect user data and save the current status, which should be resumed, if the application is unexpectedly terminated.
Now, as the collected data seems to be 'private', the Dev Guide suggests three possibilities to save data:
Shared Preferences
Seems appropriate for my purpose; key/value would be perfectly fine for my kind of dataInternal Storage
Imo an I/O on every intent is an overkillSQLite Database
Fine, too
The thing I开发者_运维百科'm curious about now, is this the right approach to choose a home for my data? Are there any guidelines or best practices concerning storage on Android devices?
Shared Preferences uses IO - as it just an xml file in data folder of your application. Choose the one which simplier for you to implement. I would use Shared Preferences.
As for "home for data" - it is ok. The storage possibilities are already well-designed for you, so you shouldn't be worry about it. Just use the one which fits your purposes the best.
精彩评论