How can I save username and password in login Application using volley to sent and request .and save setting Remember Me Login
Asked
Active
Viewed 105 times
0
-
1just use Shared Preference Volley is used for get the data from url – Raj Jun 13 '17 at 11:34
-
If you want to save for long duration save it in a DB and if you want it for shorter time you can use SharedPreference – sumit Jun 13 '17 at 11:35
-
I mean I want to save username and password so you must login only one time. i using volley to connect to database – adelRay Jun 13 '17 at 11:37
-
See [this](https://stackoverflow.com/questions/9370293/add-a-remember-me-checkbox) This will help you out. – Abhishek Charismatic Jun 13 '17 at 11:42
-
Shared preferences is also used for long time store when you uninstall the app that time only the value can be deleted. – Raj Jun 13 '17 at 11:49
1 Answers
0
When talking about username and password all answer I usually see talk about storing them in SharedPreferences and that's totally wrong!!!
What are SharedPreferences for? Preferences
Is the current user a preference? NO
So I always recommend using the Account Manager System. It's a bit harder to implement but it's the way the system has to implement user accounts (which is, BTW, what you have when you use a username + password login)
Here you can find a tutorial about implementing it
Alberto S.
- 7,409
- 6
- 27
- 46