How To Use The Sharedpreferrence Value In Another Activity In Android App
in my app i am storing a value in Shared Preference and it gets stored successfully. Following is a piece of my code SharedPreferences prefs = getSharedPreferences( 'idValue', 0 );
Solution 1:
You can simply use
SharedPreferencesprefs=this.getSharedPreferences("idValue", MODE_WORLD_WRITEABLE);
Stringidvalue= prefs.getString("idValue", "");
in any activity you need
Post a Comment for "How To Use The Sharedpreferrence Value In Another Activity In Android App"