I have an app that requires user to register. I\'ve got the app conected to PHP in my server to do the logic of register/login and so, this is not problem at all.
But, I
Yeah, preferences would work. In your onCreate():
mPrefs = PreferenceManager.getDefaultSharedPrefs(this);
And in some function that gets called after the user logs in:
SharedPreferences.Editor edit = mPrefs.edit();
edit.putString("app_username", username);
edit.putInt("app_userid", userId);
edit.commit();
Use shared preference for this purpose.. try below code....:
PreferenceManager pm = PreferenceManager.getDefaultSharedPrefs(this);
SharedPreferences.Editor edit = pm.edit();
edit.putString("user", username);
edit.putInt("pwd", password);
edit.commit();