Designing Complete Login and Registration Application

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
my end or tutorials in this tutorial I'm going to show you how can we use how can we design unlocking activity how can we do password and email or username in our Android application using firebase database on firebase services our recently I have created on new project with the name of login virus and you can see I haven't changed anything in this project and but I have connect I have connected my Android application with five is services and here is my android project that is log in firebase if you don't know how can we connect our Android application with the firebase services so you need to go to tools click on firebase in would take some time and here we go if you want to use our if you want to store your username your password your email in details and something else like that separately you can use firebase real-time database all if you want to use email password or Facebook or Google to log in your activity you can use this five ways authentication built-in services provided by five days so I have connected my application with the authentication yet later I will show you how can we design our low connectivity with the help of on storing data in firebase real-time database so if you don't know how to connect click on tool five based services and then choose your type of services I have choose authentication and I already connected my application with the firebase authentication needs say if you've known more how connected you only have to need this button which will be appear as connect click on that button and your application will be connected with five stltom database and in case in case of authentication you have to click on this connect button and your replication will be connected to five ways real firebase authentication and you have to add some setup some dependencies which will automatically assigned next thing we need to do is go to authentication and sign-in method and you need to enable your services wherever you want email password phone Google Play games Facebook Twitter github or anonymous I have enabled only email and password it doesn't verify any email is ah whether your email is valid or not it's simply enable any type of email any user to login your application using okay next we need to add some fields design our and it text and wit will be matched parent in it will be prep content and ID will be ah let's say this will be my email and input type will be email text email address and similarly work for for password copy that and change it to password and make it as email type password text password and add some margin the or margin let's say 10 DP and our heading let's say 20 DB and same lines for my password field here we go we have designed our our layout somehow this is password oops ah you need to change if you don't know how those enzyme your constrain layout you need to change it as linear layout and its orientation will be a vertical every go this is username this is password so next thing we need to type our hint hint will be ah let's say a string user name the person is that why I'm using hint as a string so let's say if I specify as enter password and let's say this sources or videos and strings and string and user name and enter email or username okay the difference is that you can see this is not showing any a warning but this is shown and warning warning that means hard coded text a good programmer is always a password a good programmer is always prevent this type of warnings enter password and then we need to specify as this string and and you can see no warning is gone next we need to specify our button button web content content but I made this as match spirit match parent and ID is are actually I don't need its ID I directly want rows on click on click will be BTN login click you do saying no matter is implemented so however a Methodists on that method is created successfully next one I need to specify it's our text so I'm going to text and strain password and login ok ah string and string and login and we are good to go here you can see add some padding padding will be 25 DP and next I need to next we need to add some of margin margin will be labeled margin will be let's say our 50 DP and here we go ok ok make it stop Marcin was in tall or 60 DB and remove this line of code in here we book login screen somehow appearing in the center of the screen and then we need to add margin left margin end and that is 10 DP module slot that is 10 DP yep we are good to go and text type text password okay we have successfully get these now we need to access these edit text edit text which is a email and password in next we need to add we need to on create and when you talk says these email is equal to edit text on yoga ID r dot ID dot ah email same as pass is equal to edit text in it final view by ID r dot ID dot password and here we go string this is my email my email is equal to e mail dot and get text get to string similarly for stray and my password is equal to password dot and get text on string okay no we need to start for a private and firebase authentication and it is authentication and then we need to assign add authentication is equal to firebase authentication dot we get to instance now we need to authentication and dot sign-in with email and address what is my email my email is my email in my password and dot and on complete listener here we go and what is our context this is the context and next one is new on complain listener and ok the same some implement method so I have implemented on complete method and if successful if if task dot is successful then we need to show a message there is a message in snack bar no there's no snake bar is [Music] there is no snack bar we need to add a toast toast dodj we make text and context in text will be mainactivity Nana to Tito's this and then we have a sequence login successful and then we have a hell are its then we have its duration duration will be let's say long or short I mean I'm going to make it long and then we need to show this and similarly are similarly just in case if login unsuccessful ok I think we have design enough are in measure of BT and login let's say if we don't have a if we don't we just don't have this email and password in our firebase interrogation storage then what we need to give an rights to the gesture himself in true user can register himself so for that we have to need start in another activity there is new and activity in blank activity with is empty activity empty activity and what is what will be it it will be us I'll finish okay let's say we have a sign up [Music] copy that and paste it here you make it as linear layout and make its orientation and what is what will be it vertical and margin-top let's say no we need this margin top as for the 40 or 30 40 make it to half okay it is done and now log in a bit in there just right click and create bt and register click in here and we need to add another button copy and paste and this is this will be as register string register and here we go okay register and we need to assign eggs and bacon and destroy click and main activity and on intent intent and what is what will be is register is equal to new intent intent and main activity dot this and then we have sign up sign up dot class there we go and start start activity in what is register and here we go on the distaff on sign up we need to again are we have all we have done with this let's say BTN edit text and edit text match parent and clap content and margin tend to be adding until you pee ID let's say this is ID as a name and the hint string name strength new intern full name in here and you can see this is my activity ok full name and you can add you can add number fields whatever you are you decided to next thing we need to add this as register register me you just got it in here we both know we need to similarly add up private I wish firebase authentication authentication and then temptation is equal to 5 is authentication don't get instance in in we need to edit text and world with that and that is email password 8 name and then we need to add edit text final view by ID dot ID dot I have all copy paste and paste and this is a male this is password and then mrs. clean in next here we email password hint need no we have to register this user and we need to authenticate dot create user with email and password in what is email and email is email dot get text dots drawstring and next one is password dot and get text in dot to shrink and add on complete listener and this in then new uncomplete and then we need to [Music] toss dot as successful else if is successful we need to add a toast toast there is this thing this is sign up dot pieces user-created success fully similarly toast and silent Lucas in text failed to quit in toast okay here we you can see we have successfully created on two activities and make it as long log we have successfully created our two activities among then we need to bad press on that press so called out on that press if this is gonna back pass and finish this don't finish I think we have you can see here I don't have any user let's run this application and the system API is machine download it no cancel and let's run it here once my emulator is running successfully I'll be back I'm stopping this video and the bad guys soon ok guys welcome back and my emulator is online no and my application is running you can see my register button is slightly out of the box so I need to change its margin as 10 and hit the apply changes once the apply changes once the changing our apply my register button will be come and the Siq rain come will come in the screen ok it take some time so let's go I hit start entering our fields and there is a B C at the rate of a.com and email password will be ABC if G enter some number one and two and hit okay when I hit login it's saying that logging unsuccessful because I have not created this in user so okay my login button Akane is not in the field this is activity sign up in so we don't need to ask for it in margin okay this is good we need to altered main activity nailed margin margin start GDP margin and - yes head apply changes yeah so no I think this button will be appear in the Supreme will appear in the screen I hope so statements time to apply these changes here we go we have the time that apply till it gets okay no listen if we have decided we have checked that if we get a B C and the rate of a B C dot-com and we have enter password a b c d e f g h when I hit my log button it's saying that login unsuccessful because this user is not registered in my field so I'm going to register this user we hit register in here we go in I'm going to make it at ABC in the rate of a will be a we'll see in a b c d e f g it's name is a b c eat when i hit this one hit back in I'm going to hit register my user will be successfully registered I hope so yes user created successfully no hit my back button and now I'm going to make it as login you can say no this is saying their login successful and maybe I think login and relativity and when my login is successful I need to let's say I need to start in another activity or another showing then I need to intent and make it as starch is equal to you know intent mean activity toward this and I should probably I should name it as started to star in dot plus okay I'm going to make a new activity which will be start solar I can show you or login with a login activity and empty activity in mean it as start K in finish and my activity is created successfully so I think no it should ok it's taken time to refresh to again with my and I am going to here this changes I apply I'm sorry my computer is taking to my store too much long time to run all to sake my Gradle build actually my hard disk is in a doctor to see shake I didn't start activity start activity and inhibited start so I think everything is alright and will appear we will appear my new activity I'm going to stop this when my gradable is complete I will be back two guys are I have apply my changing so I'm going to again writer ABC and the rate of abc.com and a b c d e f g h you are going to hit the login button login and login successful and here we go my new activity is start here you can see my new activity is started so you can apply this changing you can apply this mechanism with and when i hit back at going back to my login screen here and let's say if i enter a wrong password it will show me login unsuccessful login unsuccessful and when i hit register it will open my register activity so let me zoom this what we have done first we have created my main activity which have added text name email enter email and context which is for password and button which is for login in in the button which for register and then I put some code on create in I get this edit text field and a firebase authentication instance and initialize this instance in the oncreate method which is created by default and then I pull these lines of codes in my button login and I have created a new activity namely start then I start this activity on login successful and then we have a button register on Craig pancake I start an another activity which is register and my register activity is my signup activity and in my signup activity I have designed this layout as on name and password in the name first one is user name of email second one with the password and third one is the name and last one is the button register and I have I have inserted a code similarly for my main activity I create an instance of firebase authentication and get the email password and name from fields and I didn't use this name anywhere because this is not need to be and there's no need to be all literal and user successfully and one I hit finish you can add it either you can add this line is finish in this Lord finish okay when user created successfully if hits finish and here we go within a and on bread and bone bed press button on breakfast on pressing the back button this will finish my signup activity and then I created this one is our blank activity of start I didn't write any coordinates in 10 I add these string values to prevent warnings in my application I hope you guys you understand how can we use for aways authentication in my next tutorial I will show you how can we design a separate login activity using firebase storage thank you for watching guys please to subscribe my channel and like my videos and share my videos thank you for watching
Info
Channel: Alifio Tutorials
Views: 2,658
Rating: undefined out of 5
Keywords: Firebase, login, sign, in, up, Sign In, Sign Up, Authentication, Android, Application, Layout, Services, Studio, Insert, Data, Retrieve, Registeration, Database, Faiizii, realtime, simple, steps, how, to, Design, Activity, Complete
Id: 2kLHVZEwSdY
Channel Id: undefined
Length: 39min 51sec (2391 seconds)
Published: Fri Mar 23 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.