I am creating a simple android app with login credentials as username and password in edit text.
How can i save last entered username and password in app , when user try to relogin. How should i handle it. Do i have to store them in android app or it can be taken care of my android. Any help would be highly appreciated.
<EditText
android:id = "@+id/editText2"
android:layout_width = "wrap_content"
android:layout_height = "wrap_content"
android:inputType = "textPassword" />
<EditText
android:id = "@+id/editText1"
android:layout_width = "wrap_content"
android:layout_height = "wrap_content"
/>
2
Answers
The easiest way is using Shared Preferences.
But it’s not safe to store credentials raw.
You can do it in different ways:
like that. (this one is a good choice when it comes to bigger projects)