Create Login And Registration Screen In Android Using Firebase | App Development Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends in this tutorial we will learn to create an app for login and registration using firebase let's get started create new project right application name company domain and you can see the package here pack his name click next next next click finish now we can go to firebase go to firebase console if you have not registered please register to firebase and login after login you will get this screen add project fill this form write your project name select the location and accept the sacrament create project click on continue so here we can choose it's Android write down your package name click resistor app now we have to download this Google services dot JSON file and keep it into app folder inside file explorer we can find app we can paste here click Next to add 5s SDK we need to add these three lines from here inside project level built out Gradle will add this dependencies another two dependencies inside module build out Gradle when you are done click on sync now so if you get any errors like this you can change the version number here I'll make it to eleven point eight point zero so it worked after swing click Next we can skip this step so the other project is added we need authentication feature in our app so click on it click on setup sign-in method and we will be using email password enable it and save the setting now the status is renewable so let's sync our project this is our activity main.xml here you can choose any layout so I have constant out here just remove this textview go to design part and for this layout we need to edit text and button and a text field so get the widgets here now we have to wear the button here so make the space and now add our signup button [Music] let's fix it fix this error I had imagined right so we have added the hinge foramen and password remove this extra line change this textview is already registered we can go to login page sign in here we need another activity for login one more activity if the user has all logging we can go to Home screen so let's create new activity [Music] [Music] control activity we have three activity and the tray layout this is true screen and the login screen will approach lock scene so we are popping you can just change the texture we have to edit this used for email ID and password there is one button we have a textview I will use the five this Court cannot resolve so now we have to add one more library for fire resource in build our freedom laughter sing get the sewing error let's change the version and try again think now now it works so get the instance for fire basalt so let's check the name of this edit text remove the password [Music] so on clicking on this button sign up we will get the value like email and password from the forum which the user has built now we have to check if the email is empty or the password is empty we can use a different condition when the email box is empty we'll set the error and display the focus on the same email box and when the password is empty we can set the error for password and request focus on password edit mode edit text box if both of the values are empty we can upload an error else condition if the user has failed both the values email and password in this case we will proceed to creating user name and password for the user now we need 5 is odd create user with email and password and just pass the email and password we got in the string form and on complete listener to check the state of the creation of user if the email and password is created federal so as the task completed if it is not created the task we can show as unsuccessful the task is not done it's unsuccessful we can show the error message if the task is successful we can move to another page we can use intend to go to the boom activity else so summary message now so this textview has a name textview let's write the onset click listener for text you also so when clicking one or this textview we will move to another screen login activity so the similarly in login activity also because you are using the same fields [Music] we are using firebase authentication listener to check whether the user email ID and the password exists if it exists we can do login and if the authentication fails we can just rum the error message here so we are checking for the user if in user is created or is it none if the current user exists and it is not null we can go to we can through the messages you are logged in and we will move to our next screen login from login to home activity so when we click on sign-in button we have to perform some actions so right this method [Music] we are using the same condition here and when the value is provided for email and password we can use method sign in with email and password using firebase auth and this provide email and password we have put on complete listener to check if the task is completed or not completed so we are using on-set onclicklistener on the textview also if we want to move to sign-up screen we can use this method so we'll add the add this authentication state listener so there is one button here so that we can go back to register screen and we can logout [Music] so we are using firebase odd because we have to do logout set on click listener when the button is clicked we will use for every source for sign out and I'll just I know we can move back to our sign of activity so it is done and you can see these activities and there and we have the same stream for login and register and the textview and this is our home activity and layout for home activity now we can check check overlap click on run so we have this email and password text so if we keep it as empty it is showing that early now we have signed up after logout it came to the same screen now when we go to login screen and enter the same credentials I have put some random password it so there're now use your password it goes to home screen and when you are logged out you came to the screen go to firebase and refresh your screen you can see here the email ID and password is created and saved here you can edit delete or modify from here so this page firebase can be used for authentication using password phone numbers login using Google Facebook etc thank you for watching this video please like share and subscribe for more upcoming tutorials thank you
Info
Channel: EasyLearn
Views: 275,071
Rating: undefined out of 5
Keywords: How To Create Login And Registration In Android Using Firebase, Login And Registration Form In Android Application with Firebase, How To Create An App in Android Studio, UI Design For Login And Register In Android App, Login And Registration Screen In Android App Using Firebase Authentication, Firebase Android App Tutorial, Firebase Auth Using Email And Password In Android App, How To Sign in And Sign Up Using Firebase In Android App, Android, Firebase Android
Id: V0ZrnL-i77Q
Channel Id: undefined
Length: 38min 38sec (2318 seconds)
Published: Wed Jun 05 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.