I am trying to store the SIM Serial number as a value into the SharedPreferences but when i do a Toast to test for the value it is empty.
TelephonyManager tMgr=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String ss = tMgr.getSimSerialNumber();
// Writing data to SharedPreferences
Editor editor = sp.edit();
editor.putString("serial", ss);
editor.commit();
String value = settings.getString("serial", "");
Toast.makeText(this, value, Toast.LENGTH_LONG).show();