0

I know there are couples of way to save data for application in android recommend by Google, such as SharePreference, SQLite, Storage data-storage

But, the data store by those methods will be delete once user clear data in application detail in settings.

I prefer to save data in Settings.Global or Settings.Secure, but I don't know it can feasible, as the API said:"Applications can read these but are not allowed to write".

    /**
 * Global system settings, containing preferences that always apply identically
 * to all defined users.  Applications can read these but are not allowed to write;
 * like the "Secure" settings, these are for preferences that the user must
 * explicitly modify through the system UI or specialized APIs for those values.
 */
public static final class Global extends NameValueTable {
Saint
  • 1,492
  • 1
  • 11
  • 20

1 Answers1

0

Just save date in a file which is stored in sdcard https://developer.android.com/guide/topics/data/data-storage.html#filesExternal

Ivan
  • 703
  • 5
  • 9
  • I don't suppose that this is I am looking for. There are a couple of fields value to store, it seems that there is not convenient API to store and retrieve the data, and I need to confirm weather there is sdcard or not. – Saint Nov 21 '17 at 06:04