>
> If you want to pass it through Sahred Preference then do something like 
> this.


In activity A put your value in the shared preference:
 
SharedPreferences prefs = 
PreferenceManager.getDefaultSharedPreferences(context);
Editor editor = prefs.edit();
editor.putString("key", "value");
editor.commit();

to get the value from shared preference in activity B:

SharedPreferences sharedPrefs = 
PreferenceManager.getDefaultSharedPreferences(context);
String value = sharedPrefs.getString("key", null);

-- 
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