I am a bit of a newb myself, but so far none of the responses seem super-helpful.
You cannot currently use Shared Preferences to read the preferences in another package, the documentation says this is currently unsupported. If you combine the two apps into the one package, I think they can share Preferences. If separate apps, you should be able to load the Settings screen of app A from inside app B by sending an intent from app B to app A's settings screen. You may then also be able to do your login processing inside app A's setting screen, meaning that a login occurs within app A's settings before app "B" tries to access the server. As several people have pointed out, the correct way of passing information between apps is through a content provider, typically a database. However, Preferences are super easy to code up, and handle virtually all of the machinery. For a newb (such as myself and probably you), Preferences are more straightforward than Content Providers, and a solution based on Shared preferences is easier to implement if it can do what you want. That's my experience, anyway. Peter Webb On Apr 2, 9:28 am, Indicator Veritatis <[email protected]> wrote: > Ah, but you see, in today's world, nobody should ever talk about > "storing a password in preferences" unless it IS stored securely. > Anyone who offers the ability to store it without making that secure > should be arrested as an accessory to the computer hackers who commit > crimes by taking advantage of such insecure storage. > > On Mar 31, 5:25 pm, TreKing <[email protected]> wrote: > > > > > On Thu, Mar 31, 2011 at 7:18 PM, Indicator Veritatis > > <[email protected]>wrote: > > > > Actually, there is a bigger problem here the documentation you refer him > > > to > > > will not resolve: how to store the password securely > > > Oh yeah, that's a whole 'nother can of worms. But OP only asked about > > storing "l+p in preferences", nothing about making it secure :-P > > > ------------------------------------------------------------------------------------------------- > > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > > transit tracking app for Android-powered devices- 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

