Hi, Thanks a lot. I get it!
On Apr 18, 12:58 am, Dianne Hackborn <[email protected]> wrote: > Are you talking about two applications as in your title or two components as > in your text? If the latter, there is no reason to use a ContentProvider; > just use whatever is easiest since they share the same file system: raw > files, data bases, shared preferences. For shared preferences, you want to > avoid putting lots and lots of data there, since when you make a change it > is all written out as one flat xml file. > > On Fri, Apr 17, 2009 at 4:52 AM, [email protected] <[email protected]>wrote: > > > > > > > > > Hi all, > > Now I have 2 activities that would simultaneously access one data/ > > settings. > > However, two kind of solution can be applied after I study from the > > Android Developer's Guild. > > > One is ContentProvider, > > The discription in guild is as: > > "Content providers store and retrieve data and make it accessible to > > all applications. They're the only way to share data across > > applications; there's no common storage area that all Android packages > > can access." > > > and another is SharedPreferences, > > "To use preferences that are shared across multiple application > > components (activities, receivers, services, providers), you can use > > the underlying Context.getSharedPreferences() method to retrieve a > > preferences object stored under a specific name." > > > What is the differenet between these 2 ? > > > Thanks a lot! > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

