how to access shared preferences of other application

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

how to access shared preferences of other application

Postby arungupta2jan » Wed Sep 30, 2009 7:31 am

hi all,
i need a snippet to understand how i can use the shared preference of other application in my application using content provider.
plz guide me through it

Arun Gupta
Posts: 28
Joined: Tue Jul 28, 2009 12:53 pm


Postby saigeethamn » Tue Oct 06, 2009 10:57 am

you do not need a content provider to access shared preferences. The fact that you are storing some data in "shared" preferences is sufficient to let other applications access the same. Context.getSharedPreferences(filename,..) gives you a SharedPreferences object that contains all the data shared across activities.
If you store in "preferences" only the activity that created it can access it. Activity.getPreferences() is used for the same.

you may view for snippets.
A person who loves to share my ten cents of knowledge
Junior Developer
Junior Developer
Posts: 15
Joined: Wed Aug 26, 2009 10:51 am


Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 3 guests