I want to write a content provider for an app that exposes some data sored in the app's shared preferences. Is it possible to do that?
Asked
Active
Viewed 184 times
1 Answers
0
Why do you want to to do that ? Normally Preferences are secret data which should be only available to source app.
Incase you want to do that, you can read other's app preferences by obtaining the context of source application
Context otherAppsContext = createPackageContext("other.application.package", mode);
Also you should understand that you can’t get all preferences. When you will receive results you will see that PRIVATE and WORLD_WRITABLE aren’t available.

Madhur Ahuja
- 22,211
- 14
- 71
- 124
-
This doesn't seem to work on API 17. I want to expose some game progress saving in preferences to both free/paid verion of my app. – Pinch Oct 04 '13 at 09:14