Shared Preference data

sharedpreferences=this.getSharedPreferences("MainActivitysss",MODE_PRIVATE);

SharedPreferences.Editor speEditor=sharedpreferences.edit();

speEditor.putInt(SELECT,title1);

speEditor.putString("msg", edt_status.getText().toString().trim());
speEditor.commit();
 
 
-------------------------
private SharedPreferences sharedpreferences;
 
sharedpreferences = context.getSharedPreferences("MainActivitysss", Context.MODE_PRIVATE);
this.context = context;
send_msg = sharedpreferences.getString("msg", "");  

Comments

Popular posts from this blog

retrofil gjstatus lanuage

form object

Login Preference in android create class