I want to store data in structure form i.e. all information about many call (like call logs). What should I prefer? And I don't want to share my data with other applications.
SharedPreferences
is apparently implemented internally as an XML file which is serialized and deserialized in full on update. And it's a Key-Value store with no index. So use that only for simple data associated with your app. Any more than 50 keys and you've probably overdone it.
ContentProvider
is intended for sharing data across applications. You've explicitly said you don't want to do that.
SQLiteDatabase
is intended for individual apps to store data, and provides a lot of flexibility to store and index data in different ways. I personally use it to store logs in one of my apps. I'd recommend that route.
Another option is to log into ordinary text files stored in file storage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With