Transcripts
1. MultiPagedApp: Hello. In this class, I will show you how to integrate Firebase Inter farther up. Let's start by creating a very simple motivated up. So I was sent with grating Ah, fires for our screens. Okay, We have to import material. All right? Very. And we were great. A state for weeded. Okay, So we need and I did just to register the screen, you know, remained on down it later on. And I would just create a scuffled. Que no, I will keep it very simple just to show you how it works. So just a column, whoever text and a button we just copied and base it on the second screen and changed off their names. Okay, our skins are set up. So just in court on the first king in the second screen, and the same goes for second screen case on the second screen gun just used Navigator pop go back and the star who made of staying center everything and clean up in the name doesn't start and of course, import our screens. Okay, We would have to read eastern them as a routes to use them and later on. And I was starting screen these. Of course, I first screen longing readies terror and on our first clean, just here's the idea of the home screen name of their out, and as you can see, everything is working perfectly fine.
2. FireBaseSetUp: Now we have to reduce their are up in fire base. So go to your firebase and create a new project. I will name flatter Firebase Shop because later on you like this, uh, online store. Just wait a little big toe created. And now at every version starts with android. I will start from tragic go fivers going toe that Rachel and copier application I d. I'm just register. Okay now I don't know this fire. I already not it. So just could be this rice off coordinator on the website to the left and dances. Everything is explained. And now just take Okay, sometimes no terrorist. So everything It's fine. Don't go. If I was open your father project in X coat. Korpi Model 90 Fire. No, no on this fire And put it under the runner. Make sure toe more copy items if needed and that's it. Everything is fine. That's okay. So if you have any problem with fire base on IOS just putting this a few lines into your infinite released You need a reverse quiet any from go services and for about persistent everything should be fine
3. Installing dependencies: Okay, let's install all the frameworks that we start with the fire base car. It does go and copy from the passport box. Back that hammer. And I cleaned it first. Just a little bit. Okay? Next for your based on analytics against Kidnapped. But in Europe, you want this just, you know, track everything and fire. Base off is for Newser authorization Knox. One guy. Okay, that's not it. And go out Fire store. That's for storing covered data being for your base. And the lesson shared preferences to start our data locally and packages that get and that's everything that we need.
4. User Forms(Register and LogIn): No, I would change our team toe dark thing because it's very popular right now. And I would read this text on the first screen and replace it with a bar so it will be on top, and our user will know that from here he can log in or register. No. I want to create an your folder with fires for years Reforms one for working, one for ready, sir. So I will create one and just compete because they will be very similar. We need to import our firebase authorization and fire store for our register because we will safe on name and surname of our user, though displayed on the main screen. So as ever think it will be very simple s screen with just a couple off text foods, I think. But for now, I will great for variables name, surname, email and password because we're already Easter. Really? With email and password. Okay, So, as I said and it just a cone with four text fields, I would create one and just copied anchors, you know, begins to write it four times. Okay, So unchanged every every time that user is typing somewhere. This will go on. So our name variable would take the user input and a little decoration. It was him next so and say we don't know what this real this allows. I said for text foods and that's it. And why more Fake our bottom just to register and go to the next cream. Okay, So great. Our private authorization, That's the instance off firebase off And the same goals were fire store. So is it just creative? They're familiar, and password will pass our variables and to fire store Great A collection. It's like NATO base and document something like a table in the database. So I'll be real name. It's and said they So just data will appear in our firebase database in the document for a table email off our user. But now I have to create a NATO base because I just completely forget about it. Somebody up here is never Dayton Peace. Yeah, I would. On authorization is just immigrant passport. You couldn't go with Google signing if you want later on. But for now, my passport is enough. It's OK. You have toe. Okay. Your rules have to look something like that. Mine wasn't so I mean, that I wasn't saved. Just later on, I changed it. So make sure that your rules hello to right and read data from a NATO base. Well, if everything is set up, just bring Gator and create our bush my home screen, and check with our up. Oh, yeah, I forgot about the longing, So that's make it very quickly. Just changed every name you know, its name or surname are on this Saving and replace create with signing with email and possible it. And that's it. You don't need a fire store, and I would log in screen set up. Okay, So in their mind that don't we have to Magister our forums just like the other two screens - after a round, in the idea, going under the screens. - Okay . And we'll have toe front another bottle, because on the screen will have to choose between looking register, boom. And just a second problem. As you can see, we have to out, uh, safe aria. It is very important. We get now, like every phone has a notch or some call, so it will place. And you're rigid exactly when there is place for it. So below all the holes. And not just as as you can see. Here's our user
5. Helper Classes: let's create our couple classes. I want for local data and one for fire base data. So it will be, uh, cleaner. You have to put everything in our screen files. So in this class is oh ah! I have submitted to safe and to get NATO from alco storage and from fire base. So let's start with local. I limit user data and email got You know, I've been in this Khost windows and we don't need anything more name and certainly will be in front of base. But we need to email and password, just toe lugging other years there later on. So the years that doesn't have toe put your email and password every single time. Okay, so in that list on some shirt preferences, as against its a sink metals, because who miss if the future of while you And it means like you have a recipe in some fast food like McDonalds. So now that you will get your foot some time, but now I think that's Jesus went to explain that a sink metal we are just waiting for how resolute. So OK, so it's in the saving of her in data and now It's right. Let's get our data against the I'm using email and possible code so nothing will be messed up. Very some kind of typo. We don't read our mail, your password cold, and we will get our past 14 of in terms. That's pretty simple. Now that's important. Our the fire store and fire based off I name a fire story is very data, and we have two Great. If you're instance, our user Oh, identifier story instance. So this would be in future? A swell. We will get name and certainly it's it's a market will try and catch. So nothing quick crush by next and our final Orioles there will be Correnti, is there? Yeah, it was. And we have feels so if it is not know you can have a chief his NATO shape. I guess our collection of data base U S. So and our table e mail to see my and we will return his name from data. It's basically like Jason. So certainly, and that's it
6. Displaying UserData from FireBase: Okay, so that's this Play our user data in our up in the register screen me toe import or helping cover classes and and make the instance off it. Favorite your data. We don't need to find based data to be honest, so OK, every time that is their parts of the email. E, we're not ready story. We will save it. Clear the same things with password and that's it. Don't go to the home screen. Create first the import. Now we have a hyper crosses in the local data and the firebase later firebase authorization just toe. Well, you know of any other and created the instances and you know our empty strings. Okay, so let's start with our first meddled and trying again because we have to make sure that neither is locked when he's great at night or will be a sink. So you have to be sure if me and possible. Hey, how are you? And of course, you'll market with try and catch and made some method Still armed eight hour variables. Be sure to use that set straight. It is very important. And meat for bodies go betweens names. Okay, so we need the, um in it state. But remember, yes state it will go on and when the screen is loaded. So I hope whatever metals here start with me. Is there a greater and get made? So when we receive our MOU, we'll update it and the same things go with password. No, I love you. I will. You put a staple and try logging. You made password. And you know you are sure that these a result So received data from fire base and I'm data variable in variables name and certainly so changed from the second screen tool name and another takes tweeted with the surname and we need to our oh organ destroyer screen. Because with pop, don't go back to the farm and to anyone toe Look out! Bye. For good name things. Thank you. No quick fix. And now go and sign out. So that's tested with are is, um, not previously created. And as against we see, we have name and surname of this user. Okay, so now go in the register screen and put into smoking it and decoration off the other and saving data in correction in the try and catch a book to make sure that everything works. Fine. No, I would great in your user. As you can see, I have this name and certainly