mengdd / PreferencesProvider

A multiprocess supported replacement of Android SharedPreferences based on ContentProvider.
Apache License 2.0
57 stars 14 forks source link

我搞了个单列作为全局管理。发现数据有的时候会消失,大神看看呀 #5

Closed douya40 closed 7 years ago

douya40 commented 7 years ago

public class MyPreferencesStorageModule { private static PreferencesStorageModule preferencesStorageModele; public static PreferencesStorageModule getInstance() { if (preferencesStorageModele == null) preferencesStorageModele = new PreferencesStorageModule(MyApplication.getInstance(), "HelloModule1"); return preferencesStorageModele; } }

mengdd commented 7 years ago

只要名字"HelloModule1"确定保持不变就可以啊.

douya40 commented 7 years ago

是一样的,我都全局控制了

mengdd commented 7 years ago

@douya40 你用Stetho查看一下数据库好了.