The app splash screen is the brief introductory screen that appears as the app loads after the user has just opened the app.
When the application is launched, Main Activity sends an intent to the Splash Activity, which displays the App Logo for 2000 milliseconds, from where the control comes back to the Main Activity.
The MainActivity consists of three options:
- Login:
Users can log in using their Username. The user is directed to the Login Activity for authentication. The User first selects what type of user (i.e., Customer or Vendor) in the Spinner on the Login page. The Username for the customer would be their PhoneNumber, and for the Vendor, it would be their OutletName. Once the user clicks on the Login button, we verify if such an account with the given Username exists in the Database or not. If it doesn't exist, we display a Toast message saying, "No Account found". If the username is valid, then we verify the Password entered by the User by comparing it with the corresponding Password to the Username stored in the Database. If it is valid, then the User is redirected to their respective pages. - Register: New users can register
by entering their information. Their account gets created upon submitting
the registration form.
The new user fills out their e-mail ID, mobile number, and Password. They will select the type of user in a spinner. If the type of user is a vendor, they have to add a URL of the picture of their food outlet. Then on clicking register, a new account is created. - Login using Mobile Number: Users can
alternatively log in using their mobile numbers also.
We've used Firebase Authentication for this feature. The user enters their Phone Number, after which we verify if the Phone Number exists in the Database or not. If it exists, then an OTP is sent to their Phone Number by Firebase, and upon entering the correct OTP, the user is logged in and redirected to their respective page.
Comments
Post a Comment