سؤال

I want to save some data as num of Call, num of sms, num of traffic internet.

which is the best solution for this problem? Sqlite, SharedPrefences or file?

EDIT: i need to save: -sms count in/out/draft

tot of sms for every contacts, etc

هل كانت مفيدة؟

المحلول

It totally depends on how you want to use the saved data and what is the amount of data you want to store.

1. Sqlite:

a. Can be used to store large quantities of data and data can be retrived using the query when required and can be used as per your requirement

b. Here stored data can be retrieved till the time the data exists in database.. if application is active but data not exists in database then you can't retrieve the data.

2. Shared Preferences

a. Normally used to store small quantities of data.

b. No need to query database hence data retrieve is fast and data exists till the application is active on device.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top