This title makes me wonder on what is most suited feature in saving medium to large data on a specific application. I know there is a recent questions that i have seen on Stackoverflow regarding on saving data with these feature but I want to know, as what i have said, what suited most. Do you have any suggestion regarding to this?
Shared Preferences
Store private primitive data in key-value pairs.
Internal Storage
Store private data on the device memory.
External Storage
Store public data on the shared external storage.
SQLite Databases
Store structured data in a private database.
Network Connection
Store data on the web with your own network server.
as per official Website
Shared Preferences is better for things like settings or small amounts of data. Data stored in the Shared Preferences is stored in key-value pairs. This makes retrieving the data simpler, but there is not a really efficient way to query/search for a specific piece of data.
The database is an implementation of SQLite. This is useful when there is a large amount of records to store that all have the same/similar fields. Since it is SQLite, you can write queries to get specific records from the tables.
I do not have as much experience saving to the file system for storage, so someone else will have to speak to that one.
Here is a link to another stackoverflow discussion that compares SQLite and Shared Preferences. Pros and Cons of SQLite and Shared Preferences, as well as to the Android Documentation that goes into more details about how each method works. http://developer.android.com/guide/topics/data/data-storage.html
© 2022 - 2024 — McMap. All rights reserved.