开发者

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:

  1. Shared Preferences

    Seems appropriate for my purpose; key/value would be perfectly fine for my kind of data

  2. Internal Storage

    Imo an I/O on every intent is an overkill

  3. SQLite 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜