Monday, April 8, 2013

[android help] android shared preference one key with multiple values


My query is straight forward, couldn't find answer across google:


For Example:


Repository 1 -> username1 -> password1


Repository 2 -> username2 -> password2


Repository 3 -> username3 -> password3


As mentioned above, I have a dialog box with three repositories. When user selects a repository automatically another dialog box pops up to enter username and password.


So, what i am trying to achieve is to save repository name, username and password in a shared preference with a single key.


I know how to create a shared pref object with a single key and value. What i am looking for is a shared pref obj with a single key and 3 values.


Is it really possible? If yes, you can show me some direction.



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...