Android Login Register Tutorial will focus on creating an android app that allows users to register and login users. Users registration will consume an api which both method for authentication and posting users. Registration details will be stored in the MySQL database while login/authentication will be done from the same database.
This series tutorial we shall learn how we can be to create an android app that has a login and register activity. Once the user successfully manages to register from the mobile app
Users will be required to provide login details which he/she used during registration. Once the details match user will be logged in successfully and we shall display the username of the logged-in user.
Our user registration activity contains 4 fields which are email, username, password, and confirm password. for registration user will be required to provide all data including username and email.
Our user login activity contains 2 fields which are username and password. Users will be required to provide email and password to log in. When the login button is clicked user details will be validated against the existing store data. If it matches user will be redirected to the main activity which acts as our dashboard.
To add and configure retrofit, we shall begin by adding Gradle dependencies for retrofit, convertor library, and Http logger interceptor. The retrofit will us perform network call which Http logger will log any outgoing and incoming request.
Once retrofit is configured we shall create an API client class that will return retrofit and user service where all the requests are added. Either post, get, delete, put.