Alex Rivera | Logout

Can Shared Preferences be private?

Asked 2011-05-08T19:25:43.227
22

From the name alone, I am guessing that Shared Preferences are... shared among apps? That is, even if my app defines and creates them, any app on android can access them. Is this correct?

(If this isn't correct, then why does the Data Storage Dev Guide emphasize Internal Storage as "Store private data"?)

If this is correct, can I modify this default behavior so that a preference is only visible from the app in which I define and create it?

If so, how do I do that?

Edit
Report

1 Answer

30

SharedPreferences are private by default. They are shared among the components of your app.

answered 2011-05-08T19:43:47.377

Your Answer