Hi ,
I have a need to share preferences between two apps, where one app
writes the preferences and the other application needs read only
access.
I notice that there is this API available in Context :
So i am trying to use it by following code,
myContext =
createPackageContext("com.xyz",Context.MODE_WORLD_READABLE);
SharedPreferences testPrefs =
myContext.getSharedPreferences("preferences",
Context.MODE_WORLD_READABLE);
boolean valueFromPrefs = testPrefs.getBoolean("synchcheckboxPref",
false);
but i am not able to get the correct values ?
Do i need to handle mode while i create the preferences. I have
created preferences in com.xyz used xml to define some field
Regards,
Swapnil
--
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