fis*_*h40 3 javascript android cordova
在我的应用程序中,我将数据保存在SharedPreferences上。
这是我的代码
public void initUserData(Context context, String pKey1, String pKey2, long id) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());
prefs.edit().putString("key1", pKey1).commit();
prefs.edit().putString("key2", pKey2).commit();
prefs.edit().putLong("user.id", id).commit();
}
Run Code Online (Sandbox Code Playgroud)
如何使用phonegap获取SharedPreferences值?我的意思是使用JavaScript获取数据
| 归档时间: |
|
| 查看次数: |
3602 次 |
| 最近记录: |