Android 存储
private SharedPreferences sf; sf = TeLoginActivity.this.getSharedPreferences("basic_info", Context.MODE_PRIVATE); editor = sf.edit(); if (isSavePwd) { editor.putString("username", userEdit.getText().toString()); editor.putString("password", pwdEdit.getText().toString()); editor.putBoolean("isNeedVoluntaryLogin", true); editor.commit(); sf = TeLoginActivity.this.getSharedPreferences(Constants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); editor = sf.edit(); editor.remove("xmpp_host"); editor.putString("xmpp_host", Constants.PUSH_SERVER_IP); editor.commit(); String name = sf.getString("username", "");