1

What is the best way to persist a users info in an android app? I have a login screen that uses a web service to authenticate the user and return basic user info.

I don't care about saving the username/password, but I do need things like a couple of integer ID fields (patientID and personID) and a first and last name.

I don't want the user to have to login every time they load the app. Someone suggested I use SQL lite to store the info, is this the best way or is there a more light weight solution?

Jarrette
  • 1,085
  • 2
  • 16
  • 40

2 Answers2

2

Use SharedPreferences refer this link also

Labeeb Panampullan
  • 34,521
  • 28
  • 94
  • 112
  • ...unless you actually care about security, in which case the documentation recommends [`AccountManager`](http://developer.android.com/reference/android/accounts/AccountManager.html) – arkon Jul 31 '15 at 09:08
0

Take a look at the answers and comments to this question: Android: Storing username and password?

Community
  • 1
  • 1
Eric Levine
  • 13,536
  • 5
  • 49
  • 49