public boolean save(String strurl ,Context context)
{
    pref= context.getSharedPreferences("MyPref",Context.MODE_PRIVATE);
    editor = pref.edit();
editor.putBoolean("URL", strurl);
editor.commit();
return true;
}

<-------saving value---->

save(strurl,getApplicationContext());

<----------geting values------->
url=getURL(getApplicationContext());


public String GetURL(Context context)
{
pref= context.getSharedPreferences("MyPref",Context.MODE_PRIVATE);
String url=pref.getString("URL", null);
return url;
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to