내 응용 프로그램에서 SharedPreferences에 데이터를 저장합니다. 여기안드로이드 phonegap에서 SharedPreference 값을 얻으십시오
는
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();
}
가 어떻게 폰갭을 사용 된 SharedPreferences 값을 얻을 수 내 코드? JavaScript를 사용하여 데이터를 가져 오는 것을 의미합니다.
내가 아는 한 phonegap은 sharedpreferences 대신 w3c stroge를 지원하지만, – Muatik