1.存
SharedPreferences sp = context.getSharedPreferences("mybound", Context.MODE_PRIVATE);
Editor editor = sp.edit();
editor.putString("serial_no", serial_no);
editor.commit();
2.取
SharedPreferences sp = = context.getSharedPreferences("mybound", Context.MODE_PRIVATE);
sp.getString("serial_no", "");
时间: 2024-10-10 02:58:43