【发布时间】:2017-11-17 08:27:26
【问题描述】:
我知道有几种方法可以保存 Google 推荐的 Android 应用程序数据,例如 SharePreference、SQLite、Storage data-storage
但是,一旦用户在设置中清除应用程序详细信息中的数据,这些方法存储的数据将被删除。
我更喜欢将数据保存在 Settings.Global 或 Settings.Secure 中,但我不知道这是否可行,正如 API 所说:“应用程序可以读取这些但不允许写入 ”。
/**
* 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 {
【问题讨论】:
-
如果您告诉我们您要存储哪些数据以及它的敏感程度会更好
-
保存用户设置的密码等数据,其他使用用户手机的用户无法删除。