开发者

SQLite,Shared Preferecne and File IO: For data storing in android which one is better?

开发者 https://www.devze.com 2023-03-20 18:39 出处:网络
In android ap开发者_JAVA技巧plication for data storing and sharing in app which one is good and why ?

In android ap开发者_JAVA技巧plication for data storing and sharing in app which one is good and why ?

Is it SQLite,Shared Preferecne or File IO


SQLite is a database and provide the advantage that you need to get from the database.Shared Preference can stores some values as string,long,int,boolean...You can use this if you need to store some unstructured data that actually not related to each other.On the other hand file has its traditional features.I think it depends on what kind of data you want to store and for what purpose and also What is the relationship between your data.You have to choose according to your situation and needs.


I think that depends on your use, you can refer to the developer document, http://developer.android.com/guide/topics/data/data-storage.html, hope this will help you


They are all good for different reasons. Read this comprehensive overview of all the options.

0

精彩评论

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

关注公众号