Learn Firebase For Android | Bew Technologies | Skillshare
Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
39 Lessons (4h 47m)
    • 1. Introduction To The Course

      2:06
    • 2. A Little Intro About Firebase And Setting The Stage!

      9:51
    • 3. Setting Up Email And Password Fields

      15:01
    • 4. Intro and SignUp Layout

      3:23
    • 5. Creating SignUp Activity And Method

      3:14
    • 6. Inside The SignUp Method!

      9:39
    • 7. Completing it all!

      6:11
    • 8. Creating A UserAccountActivity Layout

      4:50
    • 9. Finishing The Layout And Logout

      2:43
    • 10. Dialog For Logout And Onwards!

      5:34
    • 11. Update Password Layout

      4:08
    • 12. Finishing Update Password!

      7:19
    • 13. Update Email Activity And Layout

      4:04
    • 14. Update Email Finishing

      6:05
    • 15. Improving UI/UX Experience For The User!

      8:35
    • 16. Creating And Showing Splash Screen!

      12:30
    • 17. Creating layout for name in SignUp Activity

      2:56
    • 18. Configuring For Firebase Real-time Database

      4:00
    • 19. Understanding Fireabse Realtime Database Methods And Setting it Up!

      9:59
    • 20. Saving The User's Name In FIrebase!

      5:25
    • 21. Getting The User's Name From Firebase

      8:49
    • 22. Showing The User's Name In App And Further!

      3:27
    • 23. Creating The Layout For Note Taking

      3:59
    • 24. Understanding Our Database Structure And Setting Up Method For Create Note

      7:42
    • 25. Putting Note In Firebase- The Incorrect Way!

      6:38
    • 26. Create Note In Firebase - The Correct Way~!

      10:24
    • 27. Reading Notes From Firebase

      16:34
    • 28. Recycler View Plus Adapter Explanation

      12:17
    • 29. RecyclerView Items Setup

      4:30
    • 30. RecyclerView Adapter Setup

      11:19
    • 31. Showing Notes In App

      9:38
    • 32. Creating Layout For Edit Notes

      5:32
    • 33. A Detour And Learning A New Way

      11:19
    • 34. Edit Notes Layout Finished

      5:25
    • 35. Edit Notes Activity Finished With A Bug (Yes! A UI bug)

      11:30
    • 36. Fixing The UI Bug And Learning About Debugging

      8:02
    • 37. Creating Delete Notes Layout And Activity

      4:48
    • 38. Deleting The Notes In Firebase And Asking The User Before Deleting

      13:04
    • 39. Connecting User Account Activity To Our App Flow And Finishing It Up~!

      4:31

About This Class

Firebase for Android

Welcome to Firebase Realtime Database development. In this complete course you'll learn all about the brand new Firebase Realtime Database, a NoSQL cloud based database technology. We start from the ground up and teach you everything you need to know from the fundamentals, authentication and a deep dive into CRUD operations on Firebase Realtime Database.

WHY TAKE THIS COURSE?

Learning the new Firebase should be taught using real world examples and that's exactly what this course does. Note that this is not a theory course. We will learn about complete Firebase while creating a working Note Taking App; which will give you a lot of experience in working and dealing with creating real-world apps.

Even if you are a beginner in Android App Development, this course will teach you how to use Firebase in an easy way. There's no need to worry or be anxious. We will teach in a way that you will learn it very easily.

Here are some of the things you'll be able to do after taking this course:

  • Build your own apps using the new Firebase Realtime Database

  • Learn how to create and save data to your Firebase Realtime Database

  • Add powerful login capability to your apps using Firebase Email Authentication

  • Debug apps and fix any bugs you face while creating such apps.

Who this course is for:

  • People who want to build advanced Android apps!

  • Those who want to create their own startup

  • Those looking to get a full time job as a developer

  • Business owners

  • Students

  • People who want to make money building apps

By the end of this course, you will have your own working app which can store complex data and work in real time!

So, are you ready?

Come on in, the class has just started! :)

Transcripts

1. Introduction To The Course: Hello and welcome to this course. This is a man Bakshi for Butte Technologies. We are the creators, A popular writing up core writing prompt. We have been working on this field for seven years and creating absolute lines and users. Now we're here to share our knowledge with you. We'll be learning by creating a real notes up which will have many functions on. Instead of telling you, let me just show you. We'll start with sign up the sign of the user using their email will get their details and save it on our database and sign them up. Then you can just log in here. Let me just show you are to log in so you can see you that are no tapas here. First, let me tell us. First sections or first sections will cover this update email, update password and log out. So these are all the indication my tab virtually cover on in the next section. What we'll do is they create this notes up here. You can write a note, create a note and it will show up. Here you can edit the note and then you can see yet I can just I did it on a little show up here, and then you can just delete the North if you want. So this is a full up on all of this is stored and fired based real time database. And this will all happen in real time, which means that they ties updated in database and real time. You can see that date eyes there in our firebase console. We'll see how this works, and we'll see our fire based real time database works. Now back to up. You can see that our app is finished and by the end of the course, you will have this complete up. And you can even release this up in the play store and even monetize it. If you want to learn about Android Abdullah pinned using fire base, we'll be waiting for you. So hey, join us. 2. A Little Intro About Firebase And Setting The Stage!: Hello everyone. This is among buck. She lets start with creating this project via you're going to use Firebase realtime database for this. So first let's see what this fight obesity old-time database. It is real-time database. That means the update happens in real time. Whenever data is it in the database, are updated in the database. It is SIMD in real time across all those lines and all devices. It has a NoSQL Cloud structures and NoSQL means dead. No relationship between the tables and it's not in a tabular form. We need to create our own era K0_L at all and set up, we need to maintain the relationship between the nodes. This is easier to Xs and Firebase obligations are easier to make the cause we don't have to deal with the service I chord. You just need to whatever you want to extract from the database you have to create where he saw that, but put them in that app site, not on the server site. So this is the main feature of vitamin C and time database. And the other feature is that even if your app goes offline, realtime database, automatic gash capability, that means that it will save the optimal among adults gash in your device, and then, then goes offline or device goes off nine. The user can see the data even without deign domain. Let's just start with Firebase Database. First, let's create a new app and Android Studio. Let's see and select MB acuity, and then really give this a name. Let's give it note taking up. And because discourse will take the whole app. But for now, I'm going to show just login. So let's see 16, because Firebase sub-bullets API level 16. Let's put iron. Do it in Java for now. Let's click finish. Creating the product. So this product is being created. Let me tell you about how we go about setting up the Firebase and connection to this app. I'll define wizard, we connect it to this app. The first step would be signing and into Firebase. You can just sign up for the Firebase database. You have to just sign in. You have to create an app gone. Then when nucleate gone, go to console. So this page will show up exploding. I've already created an account, so it's showing this. And for this yarn, you need to create a new project. I have already created it. Let me show you how to do it. You just click on this new project and then, you know, aching. Let's give it the same name and click on continue. It is asking that if you want and analytics for your Firebase project or not. So fundamentally I'm not using Google enter tapes because we're just making add photos set. And we don't need to analyze the data. Or they use a va via Soviet just disabling disease. And then click on Create button to update. Your project will get created like this. Let's just open this and see what's there. So here you can see that this is the dashboard or Firebase. This is the 3s Bach plan. You can also use this and you can see there's MOLAP connected to it. So far now, see this bright star, just and no studio has created an app for us. And now we need to link these two, this Firebase and does up. So far this will go to that, stock it by adding vitamins. Do ls is an android app, so you just click on this. It's asking that and write back is named. So what is our I'm right back and never ts. C, This is the package name for my, my Appia. We defend. So the package name would do it differently. Let's give it a name. So let's just write note-taking yet somehow. Know what big king. Okay. What do you can see it is does debug signing certificate as I do on this is if we move on to Google tiny and not reuse dynamic links, then we need the debug signings I propagate. Now thought now we can just get it. And I just said that. See you nowadays showing that you'd need to dollar or does Google services Doug JSON file and put it in the application folder up to progress. You just download this, download this signal to me that you did full or even Dewey wanted to save excited, just go to my app for literally note-taking nap. In this, I'm going to have for lunch. So you also go to this app folder. And if you have downloaded this, just call breathe as Google. Does JSON phi, you just saved, saved there. And you can see it now. You go to if you look on this, I'm right. You see though Yulia, click on Project. See it inside to see its. Okay. So what does gun dances that inflammation about our app. And it bends Firebase. It does the metadata I just apply to is what does our app ID, product ID, or does not Firebase and all that. So now back to the five is gone. So this step is done. What is the next step? Firebase SDK. So for this, we need to copy a few lines from yet and put them in our skin that put it into project, been doctored and so project but let me just tell you again. It should be I'm right. So now you can see they're both greater than phi. Is they feel familiar with Abdullah? The list, this one. So it says asking me to just put Google and does it impose A3? This is Gould has me lambda per litre, so it's already there. So we can just skip this on dependencies and it's asking me to put this line. Google's services 4.3.3, it's not there, so he just ported the prion, put it. And the next line is a nod. Projects are positive, you have to add Google. So this is also there. So it can just give it. Okay, let's just finish this on Buster, we'll sing gift. If there's any ad and it can show us they've datas, any configuration. Okay? So you can see that there's no ladder. We have successfully configured our project. Now it'll open up more and more WWW dot data later asking us to put this on Northern, Right? It's already there. So let's skip it. Knowledge it's asking us to put this debt after this, so just copy this and paste it or does the next lane dependency and not using anything else. So everything that I just set up a singlet next day's Adidas guide chlorine, right. Okay. So you have staggered but limit Firebase. Now we can just continue to on, so on. So I dissolved typed up. So it's simple, right? So he just put all the code, whatever Google this variety does, not doctor and doctor data. It's all there. And we had just copied the JSON file in the app section, which is visible when you see this, see it's then everything else is done. Sofa not app is connected, feed on I didn't emulator. You can you can see that is it I mean, you know, one name and data. Well, that visit, I mean, so this is an app. In the next lecture, we'll see how to enter the email and then authenticate it with Firebase. That's it for now and see you in the next lecture. Thank you. 3. Setting Up Email And Password Fields: Hello everyone and welcome back. If you are here, you already finished configuring Firebase and your app is now connected to the Firebase DS9 database. Okay, so now we are ready to move to the next steps. So what are the next steps? Let's see. In this lecture what we will do. We will create a layout for email and password will enter email and password year. We'll put login button Sign Up and other things. We'll put a click listener for a login button. And we will also validate the email and password fields input. That means whatever the user inputs. We'll check if it's a valid email of odd a, if it's a valid password. So the first objective is creating a layout for email and password. So let's do that. We'll create a layout in activity_main. So we'll open that. Here is our activity may now is nowadays just showing her lower. We want email and password and login buttons to show up here. And you just go here, defect. This, delete, okay? So this is deleted. Now I'll put some text to you. This text to you is 40 min. Why these texts dues are different for each, each type of input. Because when you input it, you'll see that the type of EditText is email, then the keyboard will give us accelerates in ML. To end up the victory would be two ATP. Yeah, so now it looks good. We'll give it a bottom constraint also. It's a constraint layout. And we'll keep it in the center. Okay? So it's dead. Or let's just do this. Okay? So this is the email. Same goes for the past, but our boss or it will be alphanumeric. So we'll drag this one and give it the same things. Constraints. This will be below this one, boss or do deep below the email. Just do this and give it the same bit. So these are of the same, but I think he will have to align this. So we'll just do this. It's easy to do in constantly out because you can give constraint. If you want password to align with the edges of the email and you get this and it will get aligned. So now what we'll need to do is put a login button. We'll put this here below the password. Booted up. 24 would be OK. And give it 2424 means the margin, top margin is 24. So this gap comes here. This is field for email. So you give it some ID. I always give it like this. E-mail. E t. We do it, okay? And for this, you give PWD. And for this we'll give log-in. See I always write that type beside the name of the element. For example, you can see that the males are put email e t. That means you'll know that it is an EditText for even Same goes for passwords. Him was for login control login button. So why not just give it some color? We'll change the text first. It should belong in here, okay, so we'll give it some color because we need it to look good. And the best way is to search here for this, you need two such back down. Okay, here it is. And just give it some color, which is already in that pink color primary. Ok, so now the text is black. We need to change the text of the color of the text. Really give it a white color. That is FFS. That's right. Nod looks good, doesn't it? Will have to put a sign up text here like if she has and create an account and we have to show you that you have to sign up. For that. We need some text. You will just put some text area. Let's give 16. It's not looking good. Okay, 16. And now we'll give it some ID, which is sign up. And they'll give it some text. Mazda you lived, they don't have an account that can just click here and signup. Okay, we'll go to the main activity. It's moving on to the next part, which is putting a click listener and validating the email in. So n inputs. So what we'll do is we'll just create some EditText. Okay? So email and password, edit text. The Mealy DES was to find view by ID dot e-mail. Same goes for password2. So we got these. And what about the buttons? Yeah, Login button. Say it's showing an adult because we haven't declared the button, will do it like this. R plus intelligible press. And you'll see that it will give us some sedation. And sign up text. We'll come I'm ticked because we want to keep this separate from the main activity, will separated later from the main activity, this part. But for now we're keeping it here. It's easier to separate later if you come and it always give these kind of come into because it will be easier to see where you are given which Bart and what this code does. Okay? So now for us really give this, we'll just put some listeners when these setOnClickListener dot this. And the same goes for the sign up text. So yeah, the click listeners. And just get the ID of the view using view dot getID. And must be familiar with this because it's very basic for the Android app development. We just create a switch case for this. Now we can handle multiple clicks in one onclick. So now we'll try it here. R dot I taught was the login button IT login button. Ok. I'll put a break here first. Now or they'll do is write a Mat third-year card handle login button. Click here and put a method. And same will do all this. Login button will come first. So we'll try to put the login functionality to do. Firstly, you need to check if the email and password are valid. We can just give any random email and password without the, without validating the fields, we can't just put them in the Firebase. You need to put some gun nation for email and password. For that, we create a new class called validate input. For that, I'll just click here this glass and check whether the input for password and email is valid. So we'll just name it, validate input. In this will validate the input. We put a todo here. See here, this means that the password and email fields will be validated. That means that we're not checking if the email itself as well, and we're checking if it's in this format, say something like at the rate Gmail one, I'd read gmail.com plotting e. Well, this seems like a valid format. So we can check this. And for password, we are seeing that password shouldn't be great. Tell them it'll then or equal to six gas. Okay? So we'll put these conditions here. So first method would be validate. We'll give it some name. Okay? Now here we will take first, we'll give it some return, return, true, which means he Mail as well. And so for this, we'll need two conditions. First is in check if the email field is not empty. So we'll put not equal to 0. Here. We'll write, please and your email. And now we'll also check that if this e-mail is a valid event, like the unfolding email should be, it should contain at the rate it should contain dot and all that will use a class called pack tons. So this will validate the email format. Okay, first we'll check if it is invalid, okay, if this is invalid, we'll return false. We'll give it a toast again. Please enter. Lady mail ID as means all these conditions are false. That means the email is valid. So we'll just put this return type inside. And this is a check if email is well, okay. This fine texture you've used in toast. So migrating an object of this class, we'll take data on text as a barometer. Okay, so we just put here. So now we can get a new object of this. And then it will take the context as an argument. And now it'll create a same method folder, password check if password is and are now doing some basic things. Like if Saudi this condition alone we have to give password dot lenses was 200 and do the same thing. So I'm just copy pasting it. You can also do the same. We just changed this buzzword. Dot length is less than six. We need a password of at least six character. So we'll write else or do we need? These are the methods which will help us in checking if email is relevant parser Disraeli. So we'll put this validate input glass and create an object and mean activity. Ok, so here we'll create a new object. Pass context. Its object is created value again, email and password fields input. First we'll have to store the email and password in a string. We have the mainland, but certainly now string. And now we'll check if the validate Input dot. And now in this footer toast here, if it's all rally, we'll just write valid input. So I think this hurdler, wages running in the emulator, excellently done it. See now you can see that this is our email field, password and login and sign up text. Okay, so now we'll enter the email and the email, we'll just write some random stuff here. And then we'll give it some positive. Then it will show us, see, please enter a valid email id to showing. So what if we write something like c still it's showing that it's not a valid email ID. I can click on it and see or hear the valid inputs y, because the password is also six characters. If I make it two characters, please enter a password of at least six characters. Leave Damon field m d, t. Please enter your email ID so you can see that our validating for this working, now we are ready to move on to the next step or will win next step. Next step would be to do this in Firebase login this user, okay, with this email and password, you need to login this user in Firebase. So we'll do this in the next step. For now, I think this is looking good, but when these fields are blank, there's nothing there. There's just put some hints here. See it's working and showing us please enter an email here. Please enter your password here. So user will have an idea what to do. So now this looks lag, it is finished. This part of the lecture is done. We have created a layout. We have put a sign up and login text will put duct literalists now. So we have also done here also validated the human. Okay? So in the next lecture, what we'll do is we'll connect this to Firebase and create a login for the user and if he or she is not signed up, so we'll just made them sign up. Okay. So I'll see you in the next lecture. Thank you. 4. Intro and SignUp Layout: So welcome back everyone. And VL validated the inputs folder login field. And we need to now login the user. So before we can log in, we need to first sign in sign of the user. And for Dag, we need to create a sign-up layout and design of the user in Firebase. So before we can login here, we need to create a sign up layout. So let's just move this up to before we can login, we need to create a signup method and sign up to use at entire base for Nile, decide to toast here. That sign up here. Okay, we'll see how to do that. So now we'll create a new activity, which is garlic sign up activity. And this will have the login credentials like they email and password. We'll put one more parser tree layer just to check if the user has entered the correct password. So before we can log in, we need to sign up to use that. So we are creating this activity, okay? So you just click on Finish here. So I'd activities being created. Now what we need to do is first create a layout for the sign of activity. So I'm just going to copy what we did in login activity. I'll just copy our lives because you'll be needing these fields, will be needing the email, will be needing the password. You'll also need a button. So I'll just renamed about into signup and change all the things which we don't need, okay? So we don't need to change the password. So password I have created anew freely it OK. To end della password again, Nile and just align it. And I need below the password. Okay, so now we have 2p reveals for password. So now we have two fields or paths or loci plus to check if the user has entered upon sort correctly and then match that password with the second one. Okay. And we'll just put alignment party it. Just aligning all elements. Say I'm giving it ID, sign a burden because you're signing up here, changing the text of the button from Logan to signup. Saw a sign up is almost ready. We need to remove that text alto discard don't have an account and sign up. We need to remove this because we don't need this inlet, this layout. So I'm just moving that. Now. You can see that a lot sign-up layout is ready. Okay. So this is the password via surgery where they use every lengthen the password again. Okay. See you haven't written password again. So NIH against COS sign up layout is then removed the data back, which is linking the sign of a DAC duty, Dag assimilate that duty. So we'll do that in the next lecture. Ok. Thank you. 5. Creating SignUp Activity And Method: So the next step would be linking the layout with the activity. Okay, so now what we're going to do is write the variables here. It is an EditText. So what I'm going to do is we are going to call B or dial in need from the main activity. So we didn't we don't have to type so much. Okay. So you just copy it. We need one wanted it takes data which is what? Sardonic ADT. Okay, so I just copied that. Now what else we need? We need the button, we need the validate input strings. So I'll just call P1 melon here I'm writing that password. We need to ammonia, which is the validate input. I'd just like to, okay, so now I'm just going thing it so let's not forget the best practices. I'll just comment about where we are doing the sign up thing. So I dislike sign up far df, and then I'll assign the IDs to the elements. Okay? So we're just getting the IDs and assigning the bikes here. 1 million bots or did it was to find view by DR. dot id password. Now one molting is here. What is that password again? Et ok. So fine. New id dot id dot password again. So now the next step would be to create an object folder validate input. So I'll just create that. Why we need validate input here, because you'll validate the password for my ten email format here also. Ok. This leg, the lung. So everything else is done. Now we just need to put the button here or do the buy 10-year Sign Up button. Ok. So I'll just create a sign up button. And then I'll just see the ID of the button, Marty's idea. See you can see it CS Sign Up button, okay. Assigning of using this button. So I will just see the idea and put it there. Say Sign Up button is was to find view by ID R dot Id dot sign-up button. Okay. And I'll just put a method from the Sign Up button onclick of this button will sign up the user. Okay, so I'm setting an on-click listener. In this I'm writing handled the sign-up lec. So in angle the Sign Up button, click inside this pit, this metal gate. So I'll create a new object. I'll create a new metric flooding. And this method will be used for signing up the user. So we'll see what we'll put in this method, will declare it now and see you in the next lecture. Ok, thank you. 6. Inside The SignUp Method! : So before we can sign up, we need to clear and get the email password fields and create a med tech to check if die email and password are valid. So I'll just write email and password here and get the strings and get them into a string so we can match if the passwords are correct and passwords match. And if they email, phone might disconnect. I'm just getting the ideas here. So the next step would be to check if these are correct. Okay? So let me just write what we are doing it fetching the string values C. Now we'll write if the password is equals to what the password which is entered again. Okay, so now we will show that now check email is correct email and password for maintains value. But we can do that. Non just coming ding it so that we don't forget what this is doing. I'll just move this. See, this is what we are doing. We are taking the Emalia. So before doing this, let just move this up because plus d j dot format of the email and password. Then we check if the buzzwords are matching. Okay? So we'll put this if inside of the plastic. Okay? See, okay. Now Jacob dot so it is got it. The thought went off our list, gutting. The password is valid. Okay, we'll check here. And then here or a liberating, it's got it. We'll just sign up. The user. Thought that I'll just write down coming DFS, neck sign up the user. Else. Tos dot. Make toast. Passwords don't match. Okay, please enter again. So here we'll try to sign up the user if all the conditions match. Okay? So I'll just write this. Okay, so before we can sign up the user, we need to do a few settings in the Firebase console. So let's just open a file based console T. You can see our app is connected here. Note taking app. Let's just click on authentication. This is the Firebase authentication console here in the signup method. Sign-in method will just enable the email and password. We're not using email link. So let's leave that I list enabled email and password in the sign-in method. So now just click on say, yeah, it is enabled. So now we can use the Firebase authentication to sign up. This is where the user would show up if it signs up. Ok. So here first we have to put the dependency of Firebase ought Firebase Auth requires a dependency which is the V, which is what we have to put here in blue and Asian will light. On the Firebase hot, we have to write one more and more dependence here, which is implementation. See this is the Firebase art dependency between eight. Okay? Firebase uses this to authenticate the user. So you put it in the Gradle file. And now we're going to just sing the file. So now that we have seen that, the next step would be to create a signup method. Maybe we have to create it in angle sign-up button click inside this if okay. For doing that, we need a Firebase Auth object. Ok. So really create that Firebase ought object. And what is this Firebase ought object? It is the entry point of the Firebase SDK, which means that it is used to create a user, to sign in or user, and many other such methods. We're going to use this to create a user. So you can read here, it's the same thing which I said. And you can see all the methods here. And we're going to use creates cyan, create user with this email and the design, a sign-in method you will be using. So we need fire resort for this, for these kind of methods. Ok. So I'll just create an object for lists. So we'll get the instance of this m naught from the Firebase dot getInstance. Five is R-dot getInstance so that we have on their friends to the object. Okay? So we use this m naught object. Now, he got the instance, will use this to create a signup method. Yeah, okay. And for that we'll write MR. dot create user with this email and password, you'll use this mentored okay. Emalia and then password. Okay. Fine, nearly ladder on complete list net deserted islands that the process is complete. So right, Aidan, complete with a snap and new onComplete listener. Okay. So here this, this will get triggered when the user is signed up, when the process is complete. Okay? So we need to, we have written here, we are coming to Nick. Okay, this is triggered when a user is, I need to check if ES successfully signed up. So it'll right, if does dot get a dot is successful looking to this very day less if the sign-up process is successfully. Now we can easily access the user details because design up is successful. And for accessing the user detail, we'll use Firebase, use it. Now this is a new thing for you. Firebase uses it is, is a type of object which holds the user's profile information. And it also holds radius details like their user ID, which I have told you before. User ID, the user profiling for Nick USA email. And that is stuff. So I'll just come into, so we use this object to get the users info, okay? And this is the yield or lower Firebase real-time database. This is a regular thing to do, is create a Firebase user object and then use it to show they use it in full. Ok. On the screen we'll show it. And list coming. Did this returns the, so this get current user method returns the current object, okay, got into user object means the user who is logged in. And this will give us the ADA friends today. So you can see in this is giving us that cutting deals that okay. So NIH we light at Ostia in this doest we'll write that sign up is successful and follow it, use it. Foldoc or end-user, and show the user that sign of a successful sale, right? Yes, I never successful for user dot get email. So this will give us the e-mail of the user. So we'll show the user that year sign up is completed. Else as what will happen, the signed numbers not completed. Okay. So in the else we'll write that. Doest Samhita a guard, okay, so we'll write that. So my data card. And what is that eta, which is which has occurred. So how will you get that? You get that using duct task object, task dot get exception. This object would tell us what is that exception that occurred. So we can show it to the user. Okay? Okay, so before running this, we need to start design of activity on the Seine uptakes click OK in the main activity VLSI and uptakes, remember, so in that we will put to tag this activity, will Wharton intend to start this activity? Which activity? The cyanobacteria. So we'll put it onclick of this signup text and start the cyanobacteria. So I'll go back to the good. Okay, here I write intent, sign of activity. Okay, sign of activity or late here. As well as to new indent mean. Main.js sign of activity dot class and start activity as to assign up activity. Okay. So this will typeless glass sign about duty. But do you have made a mistake somewhere here? Here we have put this check. We have to write check password. Okay, we'll learn it in the next lecture. Okay, so thank you. 7. Completing it all!: Now we'll run it to you via their check if email is Alex, I've changed it to check your password is valid. Now you click on this sign up text. So you can see that there are three fields. One is what email I'm writing, my email. You can only also user really male, please use ideal one because you'll be performing a lot of operations on this. Here I am writing paths or 1-2-3, 4-5-6. Here I lied, 1-2-3-4-5. So these passwords are different. So what will be the message? Yeah, the passwords don't match. Yeah. So it's showing that see, the passwords don't match. Now right here, 1-2-3, 4-5-6. And same I write in another password field, okay. 123456. Yeah, now the passwords match those sorta sign-in, sign up, we'll be successful. C, you can see as I never successful. So now to Lady fire that design up is really successful. We can do and molting. We can check the firebase authentications on total ok, here the user will come off if it has signed up successfully and not 2800. Ok. And just refreshing to see if it is showing correctly. See you can see it. I wondered walk she is created and the email is the provider for that. You have used email to sign up, created date, sign-in date. And here you can see this user UID. Now this is very important. This is a unique ID generated by Firebase, whatever we use it. So you can use this to uniquely identify the user and enter data or store data inside lead user. Okay, we'll be using this UID and follow that in the course. And this is very useful for now, just remember that this is a unique ID generated where Firebase put each user. Okay, it is different for each user. So now we'll create a method for login via successfully signed up. So now the next step would be to create a login method and fall diet. Also, what we need is what do we need? The Firebase Auth object, okay? You can create one more object, dia, and what? We'll get things dense again and multiply those two file with od dot get instance. Okay, so our object is created now or do I will do is m r dot plus sign in or sign method or use email and password, right? The same thing, password. And again, what we have to do is porta onComplete listener. Okay? So we have put in onComplete listener and then again the same thing or do I need to do is so you need to check if the task is successful. So we write a task dot is successful looking. This word will write reported those dear for now, which will say that logged in you that okay. Or do they emit even looking? So I nails or do 11. It has some eta. So it'll show that era. How early show that and do it. But yeah, error occurred somewhere that occurred. And we'll write task dot, get exception. So this will show us the edit. Now I will just try to run it. Okay? So first let's just remove distorts and now we'll run it. So now when we run it, we can enter the real credentials that deal email and password which we have created in the previous step. So we write the same Aemilia, OneNote, buck CIDI dot 0-6, whatever you'd identify Animalia. And then you give the password which we have given previously. Login will click, See, it's logged in successfully. So we have finished two of the biggest thing year. One is sign up and one is login. And these are the two biggest module in Firebase 4t. So we have successfully created a login, we're successfully signed up the user. You can see that everything is working perfectly. You created a sign up layout. We have created a login layout. So in the next step, what will do is, instead of showing this, doest will show on new activity to the user. The user should have some feeling, right? That they're logged in. They should see something new on this screen after login. So we'll create a new activity for this. And this is the basic thing which we have to do. And this is also easy because we have done the hard step first. We have created a sign up, we have created a login and setting up these is that harnessed. See you have done the most difficult part first. Now a morn do the easy part, which is just showing the user that you have logged in successfully. And then we'll also give them a button to log out. So you do this in the next section. On now we can just write here done, they have created a sign up layout. If sine of the user and we have logged in users says pulley. So this is done. In the next lecture. We'll see how to do this, okay, Create a new activity and then log out the user. Okay, I'll see you in the next lecture. Thank you. 8. Creating A UserAccountActivity Layout: Hello everyone. Welcome back. Nine this section, what we'll see is he had already created our login part and the sine apart. That is finished. So here are the objectives. What we'll do in this section, create an activity to show off to login. Show the activity after login, and then we'll perform the logout functionality. Ok. So let's get into it. First to ingest creator activity, this activity would be a blank one again. So this will be called user account activity. Okay? So this is our activity which we're going to show to the user after login. So as you can see, that activities created now. So the next step would be to create a layout for this. For this, I'm thinking we cleared the text here, welcoming text, which will say that the user is logged in. Okay? Like we can write here and I'll come text and make sure that okay, let me just align it first. You should have been the same death that you give it some text size with 26. Let's go it 26. Okay. A big text. So it's in the same night and see OK. And so in the same debt. Okay. And below it, or do we do is we align the logout button. And now I'll get this takes some color. Why? Because we are going to change the bag down. Okay? So this is a value come text in the logout. So the layout is created. Okay, you can see. So the next step would be getting nine days in non-activity. So what we're going to do is let's come as a rule. We didn't give IDs at night. You get some ideas here, should be welcome message d, v, Okay? And here it onto the change. So you don't want me to do the same thing and come and will declare it. So I'm just getting that ID is yet, okay? So these two things are there. And I want you to do is for us to put some text in this welcome message dv. What do import is? We check that cutting deals a flood DAG Lord will do. You need firebase object. Okay. So the light excited base OT, and this will give us that instance. Okay? Why are we asking for this? Because we are going to show information about the user in this page. Okay, and what will be that information for now, let's just show the email of the user, okay? And for this we're just right. Now you need the user object from what Firebase ought object. Ok, so this will give us the current user. So after long in, the user will be there, okay? The current user will be there. So you get the details in this user object. Ok, so now change that text of the welcome message. What we will do, set text. Hi, and then what I will write here, user_data, get email C. This is, this kind of text concatenation is not recommended like fun. Now you're just putting a deal. That's what seeing, okay, and what is left now, this Load button, we need to put that collicullus Nevada Logout button. Click listener, this like this here, and make that do it in blue and click listener here will get diety view dot DID simple switch case. For now we'll just leave this blank because we learn about it in the next lecture. We will just idea Do or do, log out here. Okay? Now what we need to do, we need to show this activity on login, okay? So you just go to main activity and here we'll write that tend to show that use that account in general right here in main activity dot. So not descendants tag that duty if belongingness successful login, so non-decision, then you convert this into a comment. So in the next lecture or two, we'll see is if this looks like after login, does it show the screen? And we'll see that log out function d and so on. Okay. So I'll see you in the next lecture. Thank you. 9. Finishing The Layout And Logout: So welcome back everyone. So in this lecture or do we'll do is we'll, I'll lady Linda, activity. So on click on Login, this activity should open up. Ok. So let us just magnet. Let's see if it works. I'm running it. That's around it and then print books, window, that login logout functionality. Ok. So it's opening up. Yeah. And I'm done my login SAIC showing high on one machine. They're a gmail.com. Okay, so now we have successfully logged and ensured another activity, so on and then homepage kind of thing to the user. So the user knows now that is logged in. What is the functionality to what we have to do? See this on this log out button for now is not doing anything. So we report that functionality. What should we put c in the Firebase? It's ready z2 law out. What we need is we need the OT object retrieved, created. And then simply under idea sign-off, this will sign out the USA and end the session. Okay? We don't need to do much. This is the only line we have derived here. But the user, it sure didn't see the screen. This is green. After log our dog, you should see the login screen. So he just idea this dot finish, this will end current activity. So now what do we do is we run it again and see if this works again and again. So here we go, account I'm logged in. Now I'll just click on logout, Soviet logged out now. But this logo was very sudden. So tied to Puerto dialogue. When the user logs out again. Here, I will put down dialog here. Okay? So you see that how to do it in the next lecture. And we'll all saying more functionalities here, like update team, a lot of day password we'll see in the next lecture. Okay. I'll see you in the next lecture. Thank you for watching. 10. Dialog For Logout And Onwards!: Hello, welcome my area. So in the last lecture, as I said, we don't want the user to log out. Suddenly. You want to show a dialog box here. So we'll show in a leg dialogue here, fast to eat, just remove this allows functionality. Now ensure here. Logged out dialogue, which will confirm like if the user wants to log out or not. So we'll need a new alert dialog dot Baylor, saying this, what? We'll write this, okay? Because this requires a data object bias context, okay? Doing that led cysts saved upon text of this activity in context, okay, here is night on text is worried to this. So we have an object for this context, context here. And instead of this, this is better. We'll write builder dot, sect, MSH. So what is our message? I, you sure? You want to long out. So I will write here, sec positive button. Ok. So in my message folder button, what will be that? Yes, logged out. So this is uses saying that it wants to log out and write this end will also need a negative button, and then we'll write a dialogue or interface here also, right here. So this will create a dialogue of this. We need to create the dialogue first. So there's very level, right? We're not D. So a new dialogue is created. Now you'd show that I know. Okay, so when right, dialog dot. So in days, we can say that when the user clicks the positive button that he wants to log out, we'll log out the user here, ok, log out here. How allele logout? We saw that in the last lecture. We do sign out, okay? Five is R-dot psi naught. And what do we need to do? We need to finish the activity. So we'll write two T. So we are casting that to date to the pons context because in this, inside this the context is different. So we need to cast this activity to the context. And then we can just write finish. So this'll finish that current activity, okay, which is user a contact to ET, symbol night. And in the negative one, like the user doesn't want to logout what we will do will dismiss that dialog or doing right here dialog dot interface, dot, dismiss. Okay, so I think they should work now. We'll direct. You got it right? Positive. Yes, log out and log out the user and finished activity. If the user doesn't want to logout, we'll close this dialogue is time. The emulator will ride the Emalia again. What was that? Write your own email login here. Now it's open. Ok, so Laudato you'll do is click on this and say this dialogue. Ok. So say there's beautiful dialogue has come up. As the user want to logout, I show you one to log out. If you know, the dialogue goes away. And if it lay PS love out. Yeah. 11. Update Password Layout: Welcome back everyone. In this section, what we'll do is we'll try to see how to update the password, okay? So you have created about ten year already. So the action objectives would be created an activity called update password. And the layout for this, we need to validate the passwords and the user enters a new buzzword, we need to validate it. So we need to validate the new password and then update the certain Firebase, that will be our last m. So first let's just create an activity for the update password, which will open up and we click on this update Password button. First legs or Sina update Password button here. You do not update password. So then they user account activity via providing an update Password button. This down. Okay, so here we'll write update password dot set onClickListener, not this. Okay. And in this on-click listener will right? This is a very basic right? Assigning IDs and clicking on it. Yes. So here we'll open what show up date password. You create a method here for now in right here, those taught my update password here. So what do we need to do in this activity? What is it to do, easier to do. So. So now we need to create a new activity. So you go here and Keita duty to DMT1 again, light update password. And Dave wiki. Okay. So this really is very loved data pass or the next step would be to create a layout for this. So it'll create a layout. Now. Go here. So here we'll need to password fields and one by ten to update the password. I'll just call ph from we're recall period from Signup. Here we have two passwords and all that. So I'll just copy this. See, this is just, I'm saving some time here. If you want, you can create the layout from the scratch. And this is basic stuff, so I don't want to focus more on this, right parent here. Instead of password2 and just aligning it now, you can do the same. Here. I'll change the idea of this state. Plasma will keep the same ID, just fun recognizing it and the design is already, see, this is not coming, this alignment here, let's just move it down. See our layout is done here. You give it some padding. The button needs some burning because it's not looking good. So a layout is done here. For the update password. We'll assign it the functionality in the next lecture. For now, I'll just get the passwords quickly here. Password2. I'm get, I'm getting the ideas quickly and just to save some time, declare button. So you give these functionalities in the next lecture, OK, fun. Now we have declared it. Declare the way declare the layout of the activity. Layout is finished. I'm deadly update password layout. And the next lecture we'll assign that functionality to these fields. Okay? So I'll see you in the next lecture. Thank you. 12. Finishing Update Password!: So welcome back area. What we are going to do now is you can see here in update password activity, the XML file. Here you can see that there are two paths are yet. Okay? So in one of these, we're going to show that text. Okay? We want to show the user what they're typing. We don't want them to forget what the word password they entered, so we change it to text. Okay, so next, now moving on to this R code back to Josh right here. What we are going to do is given click listener for this Update button. Okay. Here we are going to write update password there in Firebase, and then we'll declare this method. Okay? So yeah, it's a declared. Now he put some string here, string password, same thing which we didn't email. Okay? So password the BT text. And now what we're going to do is validate the password plus to check if it is valid. So in this if condition will ride, so far that order will need, yes, we'll need the validate input. So validate Input class here, use again, but you have created is to, you validate input this okay. Here. So validate Input dot check if password is valid. So it will check, will take the, again when anyone you can check. But let's just see that. Okay. We'll check now into passwords match because we want the user to enter the correct password. Okay? So we're just checking if he is check the passwords, okay. So if the match, now what we'll do here, update in IMS, okay, L, So what do you do reach Iowa? Those TL deck passwords don't yet, we'll write the update method. Ok, so all felt that what we need, we need again the author object. Often use objects will create art, yet highways on object. Let's name it FileResource for User a login like same thing. Highways user. I have a seems okay. Here we'll get the, okay. So you get the instance here again. Remember all this right? And getting them dense in the Firebase user C, this is the, this is like, this is the same thing we have to do again and again. And the operation that you want to perform under user object, and then you will need a Firebase Auth object. Okay? So this is the process which we are doing again and again. So that is the standard process, ok. Here it showing update password. What will write in this password again, you can make parts are, and also again, what we'll do at an onComplete listener knew on complete list. Okay. So here we'll write if model, right? Yeah, but task is successful, that means password updated successfully. Host here. See here we need to show that you learn what the password is. Again, password update tick T2. This is not a best practice, but for now for this example, we're doing it so that we know that the password is updated. Else there is some error. So the same thing, some edit occurred, or does the data get exceptions? Okay? I think they should create a new password for the user. So now you need to start this activity. We're in the user account activity when we click on the update Password button. Ok. So see there the two year, we'll write again the same thing. Date. Update US productivity. Okay? So now this is time, the activity and the activity, the password doesn't get updated, okay, so you try to run it now. Again, you need to login first. So we logan. Yes, we have logged in now and I'll go to update classroom. Okay. In order to do simple, we'll write venue plasma. So I'll plasma towards 1-2-3, 4-5-6 filled right? 12345678910. And then we'll click Update plasma. See showing that pass or an update tick to 1234567. Okay. Now what do you do? You go back and logout. So yes, we want to log out. Now if we log in the despots node, ok? 1-2-3, 4-5-6. Then it won't let us login because that password didn't violate. Okay, see, you can see it. Ok. So the boss or it is invalid. Now we'll died that direct paths are delayed S7 here. Now you'll login on your lap and say it's logged in now. So the password is updated successfully. That means okay. So for now we are done with the update pos selectivity, okay? So this is the update plasma light duty. We have validated the password via updated it successfully. We have the layout for this, okay, so now you check the sectional objectives. So this is done. We're done with this angle, we are done with this. Okay? Successfully finished update paths or not do it so fun. Now this has it in the next lecture or to a loop. I will tell you what to do. Let's just go to use an account. Yet. Let's replicate this. Ok, there's one more button here. And now, and I wanted to be this, we're done doing. This will be update email button, okay? And we update Emalia. So you'll see this in the next lecture or two, we'll see how to update the email, okay? And the next lecture we will see this. So doe come back in the next lecture. This is a fun now. Thank you. 13. Update Email Activity And Layout: Welcome back everyone. So one now or do you have done is we have created and updating it by ten here. So in this we are just getting the adapter ends. Something we've declare it ought to do is put a click listener on this simple like Puerto click listener. So click listener will come here. This update email button. You will create a new method yet update email activity here or do I will do is to do email activity. Okay. Simple light. So this here will show the updating electricity onclick of this button. Okay. Update email button. Okay. Now faster you need to create an updating inactivity. So again, the same thing or delle due date email activity will create one activity for updating the email. We'll name it update main activity. So an activity is being created. So fun knowledges theta less than objectives. So the objective from this section is I create an updating electricity, create a layout for that update. You may like to validate the new email, okay, and update the new email in Firebase. Okay, so these three things we have to, Okay, so let's move on to the layout creation part first, because it will create a layout files and then we'll assign it to a T. Okay? So I'm creating a layout first. Port an e-mail one. And it's just a sign, align it. Let me just clear this layout quickly because we have done this many times. It's fun now I'll just created medium, this updating min button, okay? And then we write here and update the name. Update email. Okay, let me give it some padding and plug these and I'll put some india. See what we're doing here is I'm Kelly is asking the user to input the oil email first because we want to ensure that the user knows what email here and okay, here we'll write, please enter new human. We match these two email. So we have three male fields here. One is for all the mill and s1 new human, and there's one button to update the image. So we'll match these two fields are female and new email because we want the new email to we defend them or lehman. Ok. So that's the logic, what we're using here. Or linearly T-bill, right? What was it? I knew I D, I dot, d dot. So I'm just assigning IDs here. Whatever button. I'll updating male pass, update, email button. This has about ten. I just declare it. And I'll just put them on click listener on this. And it'll put on that 30th updating Melian Firebase. Ok, so this will be our method which will update the email in Firebase. So we'll see how to do that in the next lecture on now this is a, so do come back in the next lecture we are reviewing, update the immune okay, and Firebase. So I'll see you in the next lecture. Thank you. 14. Update Email Finishing: So it comes back out and we get that email inputs NSString My via getting these because we wanted to compare, okay, as I said before, we want to compare the new email and or lehman. Ok. So before we can update the email, we need to first validate it. Or do we validate? We need validate input object took the glass which we created, reuse that and as new. And then yep, so iterative value data and put after evaluating the new email or doing C, Is it though early male matches with the new even if it matches or to ensure, ensure toes, TL dagger, a new email. Be CMS boiling, okay? As ordinary LU L2 will just dig down e min. Okay? So how do we updated? Five is authorization and we need user for every operation on the user. Like update, email, update, password, everything. Okay. So yeah, just repeating the steps here. Why am I to be doing it again and again? Because I want you to see how it looks. Okay. Firebase and ought and then five is use it. Just get the G9 deals from the OT. Simple now or do a loop. Resist idea of date, email, simple light. And we put here knew even light because you aren't due for this new email UNGA firebase console. Okay. And now what do you do? An on-click listener knew. Yeah, so this is the now yet in this order you do the same thing. Task is successful. Then martyr's death. Email dictate. Success will lead to regime in the new one. New even as some eddy currents and below array. And this is our standard process. You can use this in real projects also. This is our 12 Cindy or projects. Or do you do taus dot get exhibition, simple length. So this is our process is completed now. Now or do you do is put this updating the electricity in the click listener font, this update email button. Where did this button is enough? User account activity. So we'll just put it. I'm just going to copy this because I don't want to type again. We write yet update email at D. So let's just run it and see if it works. I think editing is done here also. It I login again. Do something about this also later. So now we'll just go to this updating and debt or Lehman and just write out orderly mania. And then till then you even now. So I'm just changing it to one mux. You can change it to something else. It doesn't matter what it should have the email format. Okay. But it doesn't have the email format. It Montauk. Why? Let's see. C, Please enter a valid email ID. So we'll just put in it that ats, I'll update it to this. Okay. Let's see if it works. Email updated successfully to him and not Bakshi and the red gmail.com. So how would we know it does update it? That's login, logout form yet. And login again and enter the password again. Okay, so here we go. We login C. So it's logged in now that e-mail is changed to this, how we can see they elicit yearly change. We can check the Firebase console, okay, it will be updated there. So this is our Firebase dashboard. Here we'll see an authentication tab. You can see it. It has changed tone, but she had the rate gmail.com. So now what we'll do is reaching it back door 100 bucks his ITO six. And this changing to my dear Lehman. You can tie it again. So this is just a process. So I think we are done for now. What we have done, we have successfully completed this. I'm dating anymore, dude. Okay. And here you can again see does change. Okay? So we have successfully created an email layout and that duty, you have validated the new e-mail and we have updated then you email in the Firebase. Okay. So we have done most of the things now. Updating will update password, logo or sign up login. Okay, so I'll see you in the next lecture. This is it for now. Thank you. 15. Improving UI/UX Experience For The User!: So welcome back everyone. Via Huangdi. One object of now, which is C, The objective, didn't really use inexperience and using that phase, you go like that. So objective would be to improve this experience. How do we improve? You can see, and I'll login pages pretty is pretty empty. It's not it's not good, It's aren't beautiful. Okay. It's not appealing to the user. Signs in Abdullah, but I always think practically. So. Instead of getting utility in this course, I started with the example. And now I wanted to make this more user-friendly because that is most important. But even if that app as taus into a functions, if it is not user friendly, then it's not its onboard. Ok, nobody will use it. So far this, I'm going to teach you how to make this more user-friendly. Most on the pronouns don't know neck because they're focusing on the features and not on the look and the UI. And doesn't also imparting. So let us just make in one beautiful, okay, what do you say? Ok, let's tie. Okay. So I'm just flawlessly on this, make this Barton It's this button, Login button. I'll make this login button bigger. Okay. So I'm going to show you just one based now because of the time constraint. I don't want to make this another section. So this is just the UI by and what do you do is beautified the space. Then you, then I'll show you that a debate has auditory channel under D1. So you can just see it and it's just basic layout. Like it improves the user expedience. So you can also do that from non, just see your diamond doing C xsd it. So I'll just put up any context here to appeal to the okay. So this next to you or do you believe it is Portland? They didn't let me design it quickly. See layout is finished. Now, you can see that I have 40-year progress via which isn't it's been now and make it visible. Just to show you, I put up her own as via the end because when they use it as logging in here, each picture you shouldn't know deck, the process is working in the bag DOM, so you should give some, show, some I'll put there. Okay. So now these tough exterior, this is looking good, right? And what, I don't want this, this blue bar here, this action Bosnia. So I just create a new state. And I do that. I does CO2 values span, so Yeah. And I'll just call penis make kid no action law. This is what I'm trying to do. And removing this x in Canada because I don't like that color. It's hard to looking good in that I list. I just gave this. This is fun, Likes and live. This is Carnot kicks in, but law that business will apply this knowledge in Latin it on that on this main page. Okay, so I just quote to the manifest and apply this team yet on the main page, 19, non-action motto. And follow this. This is okay. Okay. Why this value yet I now see, let's see if this is not a tie Duran Nick months. Let's see how it looks. Kate looks, it looks much better, looks appealing, and it contains a Townsend is okay. So they use Erwin nor that Ortiz going, you know that this is our log in base ten or friendly message it just to appeal to the user. And what about this broader ways by which we have added, it's him, but they just go to the main activity. And good friends while this progress bar, how do we do that? And politeia progress bought my name, Darrieus brokers dialogue, which is also integrate the function and void. But he didn't function because it does duplicate and now, okay, so we'll use this one. For this, what we do is for the login and log in is clicked very shored up broken as BOD. Okay? Because if you want the user to see that something has happened, and R2D2 here and the task is successful, we hide them. But often in spot C12, she see it in action and see how it looks and how good it looks. Okay. I now see the BOD, is there progress, but once it's logged in C, It's one. Now you can see that I have updated this beta also. There's basically out creation. You can see the cord on its own. We show you how that made. This first one is updating min data. Does Hong Kong to have protamines AGN, just doing that easily, you said, okay, the user should have summing, cutting. This is important when many developing your own app. But if that user expedience is as important as functions, ok? So you can see good going into new Bossman makes you more secure. So that bomb being the user to enter a new password. Okay. So this is our new layout. Looks good, right? Okay. Sorry, I show you the layout. If you wanted to see the sign up. He'll again modified it. We have put a progress bar and sign up on so you can see here as long as about him. Ok. And we have done the same thing in the sign-up duty on snow and show this progress bar. There's no problems reading this one because it's short doest here instead of a profit as well. Because this is that competitive leads one operation. Okay? So a list show a toast here. Same what the password and short taus d n, but via improved a little bit, just to make it more appealing. The best is this one, c, it's silver, right? It's bleeds in both. Dielectric is appealing. So this is value creator. Use an application. Okay? So we have completed this also improved. They use inexperience and using the face. This is been quite a journey. We then Callum, Hello, I do login logout and creating. I'll add on fire this up. Okay, you can see it. There was nothing here, Kay, tick this. They also created update, email, update, password, and log on. Okay. So d that some of the biggest more deaths by using Firebase. So all this is, I think this goes get Sugata response allocate or booleans. D2 outdo. Make this into a real app where you can take notes, eight naughts or delete notes, and see you next time on 90K. So you'd be using what? Firebase and he end-time database. Okay. Yeah. So it'll be using this so far nine indices it you're calm, edify, do continue landing and do tell me if you want to see further negative as lag meet the new tutorials. For now, this is it and you are ready to use Firebase authentication amniote on applicant doing for my new lectures that you're to be about. Taking it and uses authentication to log the username created_at. And he'll not taking sides here later. Thank you for watching and do leave an honest review. I appreciate then honest feedback. And don't forget to ask any questions. What do you end up? Q&a. Okay. Thank you so much. 16. Creating And Showing Splash Screen!: we'll come back. Everyone on this section will card how to create a real note taking app. So what are not taking up will have for now we have this. We have the other indication Set up. We'll add toe the same. Okay, after logging what we learned Relax. You can ignores here. Okay, so relax that So what will be what will be will be adding first we'll be riding that you can create north then in this app usually bear ignored title are already do is well I believe the note. See, this is a regular and what a little short. So this is what this is regular crowd operation, right? Create a big deal. It's we do all of that. Okay, these are the basics and these are the most important operations on a date of it. So we'll do these Okay for now What we do is t You can see that the object is in this leg section. Okay. In this section or to do is create a splash screen first, let me explain. Water splash cleans splash screen. It's something like when you open there you're nothing that there is a blogging, right? So before this large in pit, we show some image, okay? And that will be a activity. So in that in that to determine if the user has already loved Do you mind if I have logged in? Okay. Even if I have logged in, it will ask me again and again to log in every time. Wait on that. Okay? You have master seen in Europe, Balto, that every time a pipe is back here, then I have to log in again. But I have already loved night. So I should see that this homepage, not that big speech. Okay, if I have loved in any five already logged So what we'll do is we'll create a splash and in the expression clean, we'll see if the user has logged in. So let's create a splash screen here. It will be an activity splash screen. And I think what an activity. I'm dead to do this and it does not think where tires activity Veta within a made on it. Okay, a gesture was an image. That's it on Induct the court is different. Okay, how the court is The friend will see it now. First, let me just change it to something made here. Do we make it the major U and really put some source splash screen. I created this image. I created this image. I put this in the sources. You can download it from there. And for this you can see there somebody spacey it will exist. A move that out of a movie will the real stressed image like you. So it is. But say to remove those rights faces, I've traced them. And to fix that X and Y coordinates, this is likes. This is the life. Thank this is that this is a bipartisan. This is the X cords time. What fruit? Next way. What does this do? This Wilfred Damage to the exit by communists. Okay, Now let's go back to the last green activity. Hear what we'll do is first will get the authentication fire with thought which used an email and everything. Okay, I will use that. I got instant like So Now you have got that using this agenda. Current object Know what is the current talk incurring user object. What is it? It is currently Lord been use that. Okay, so if I have logged in this object will be This will object will hold that fire with user venue. And if I have not loved, then its not love them This this okay leg mission We are to do that Just create a fire with user name according to use it Now you get back fired before dot c There's a current use You can see every time the car inside ended Firebase user on now if there is none Okay, so there's no user were signed in Italy. Britain None. Ok, you can use get current user nautical tonight to check if I use that is signing So you just get this user first. So now you take it issues that his nautical stoner What does that mean snugly into use That is our regular So what we like here log and really start activity What? What activity will start here? He's dragged the home activity Let's just call it home Inking I prepared an intern quickly We know this night so I'm just creating it quickly No Okay now if this is not, that means they use that is not logging Okay This current user is not a green day There is not logged in So what do you do? Evidential log in? Okay. He added up to change me up, right? News that a counter. Okay, he's loved. Then we showed you that a contact city, if he has not logged in, will tell it to blogging. So how do we tell it to love it? And the user logging threes and them to the log in it too. So this should work. But to show that splash screen, see, that will be Instead, you won't be able to see that splash. The should watch like they have putting in that manifest. Or do you have to change their meaning to the logging by before logging opens? Before we want this plastic duty to open up. So he likes back during the year. And then we'll put the long in here. We need the style also. Well, let's copy this year. Okay? So now the four tech duties one splash screen a dude. Ok, well, you guessed started. No, Let's see. Splash shows up. See? See your does. It didn't show us blasting. What was so special in this one? This didn't come directly. Are you there? Can Chema Because they have already loved Now, if you want to show the user that, uh, this image we want to show the splash image doesn't made you want to shore, how do we show it? We wait for some time before doing these operations. Okay? How do we before opening these activity, we need to put some very two years. How do we do that? Well, Creator, Hang, let hang left. And that his will to you. Thank you. Okay. Now, we'll right here before starting this more to your doors. I will put it here. I know. Not boast Nietzsche, like 1.5 seconds. This is in milliseconds. Okay, so this will be about 1.5. So we'll put this inside. Hanging up, posed a league. This is showing an arrest, but just make it finally, so you can see here after 1.5 seconds. We'll check if the user is now or not. If he's not, that means he's not loved it. So? So if he's not loved them into the logging activity, if he's logged in, that means the current user is not equal tonight, so we'll show that user contact. Okay. Simple night. So, electronics. Now let me explain. You're about hang lived in hang. Let is type of class and enjoyed, which you can use to delayed operations. Okay, It's like that too tonight, Vanek throughout today. True Bill Adopt sighing that is used. So just let operation see, You can see the north taking splash screen. See? It's beautiful, right? And if I log about what happens, let me log out. Ensure you now the splash screen will open the logging. Okay, after splashdown will be the log in screen See showing I so beautiful Now it looks like a really so the next step would be See I want to show you these operations like create Reddick delete and show the north So these will develop these are complex operations. Okay, so I start by showing you how to create and show that notes. But before that I want to show you a simple operation. Okay, so you get the gist offered You get the hang off. Okay. So fun now Or do you do it? I will put a new free Linda Sign up activity which will be off the name off. The user will save this name in the fire base. Okay, Firebase date of its OK, Leontine date of this. And then we'll show that in the home activity markets are for now, it will do is pretend you feel to them new feeling that I had a new feeling Sign over. Do you carry open there? Sign of activity. Layout will open here We last Ni ones. Okay, so because copper, new text view let me just a line it quickly. So what we do here? We'll get the name of the user using this using this field on. Then we'll save it in the fireplace. Real time data for knowledge ist believe this. You know, recreate, one will sign up again. Okay, So, like, just delete it first. It's deleted, right? Really? Signed will sign up again by why we want to sign up. Because you want to save the use That name in the data vis you can see the date of is here currently it is not. Ceta will set up this database and then we'll see the use. That here. Okay, so you do that in the next lecture. For now, I think this is it. See? You can see it either until your name. Yeah, that's come up. So they do this in the next electorate. Put the functionality in the next lecture. Okay, You got that right. So we do that in the next leg trip for novices. Thank you so much. Positive responses. I'll see in the next lecture. Okay, bye. 17. Creating layout for name in SignUp Activity: Welcome back out. So in the last lecture what we did Waas We're here today. Lay out for the name we give er I did a text Did text here. Okay. As you can see, this is the sign up page so far. This or doing do it. Well, first, get that instance of the name me de in our no sign of activity, So regard the instance off the name me. Okay, so regard instant off this name here in a sign of activity. Now what I will do is saying what we did in the email and password section. What will you do is you get done. Name according to name et get take, Start boosting tonight create Ophelia regard the name also on Final Click will get the name from the idea before all this. What we'll do is we'll check of the name is empty. All right? Check that. If it is not empty, then on little sign of the then on little Walters. Yeah, imported inside. Name is not empty. Name is not empty. Sign of now. What? Do you do it? If else name is them? What do you do here? Quickly, Like try to sign up. We lied. Something here. Come last. Alright, normally I'm viewing. I'm just testing of it is working. Do you think that I'm name? Okay? Chewing please them data. We're tied. The progress body. It is showing up on no reason. Start signing up just showing the programs. We'll just hide the progress. But I didn't say that Pleasing. So doctors working, right? So when they sign up, a successful work to do is we'll save the save. Naming fire base the year time data. Okay, so we'll do this. Okay. Well, see Did not next lecture for novices it. I'll show you our to do this in the next lecture. Thank you. 18. Configuring For Firebase Real-time Database: Hello and welcome back Over here. We have Dunder still here. We have saved the We have successfully signed up the user and then we're trying to save the name in the file based real time data. So before we can sign, save the name in the database, we need toe do some configuration you need to configure the data is how do we configure the database? It's easy, right? Or do you do it? We go to our, uh, dws here and joining us this cloud pyre store For now, we're not using our fast or we're using the I always of your time database will go here and clearly gone created. So it has to more. Now it is asking That's with more. Do you want to select? It has a lot more and it is a test more so in the last more water funnies Anybody country'd and died in your a book North No type party will be able to read and write in any when you won't be able to read and write in your But that will be that will become the productive because we're using this to create our own map So I just started, not taste more. First this anybody can read and write in the log more, you can use it. But you have to give some condition here that Onley the long menus that conducted on leader long term use of concrete's Okay, for now. We'll use the test more just to simplify it. And I want to show you all the database looks and how it works. So for now, I'll just simplify the rules anybody can read and like, this will be only for yourself. Okay, that your lower left, we put some rules here. Now is just, I think, the article to write a call just to simply fire on process. So far now, I have just created this, and it is not. It is showing us this warning on. It's really good that they're showing this warning. They're saying that your databases public okay, anybody can steal a modifier, delete your data so as we're not creating any sensitive data, please. And we had just using it for our use. Now we'll just set up the database. See, the rules are here. You can change them anytime. And we need more about you. Contain it on day. If you use it in the deal on project, you continue to something else and just click here and see the rules. You can. I get them anytime you want. If you want to release this happen placed or you can just change it to a more secure rules . Okay? For now, it's just using that simple. So now what do you do it? We'll just see how to set up the data. So far, the using fire with very time database. We need to act this dependency in our project very like this, Can you tell? Yeah. And that little fight. So we just act this invigorated and fight. What? Five of these? Are you buying this? Why were writing this? This will give us the process. This will give us the methods which were used to retrieve data saved a time when you played the daytime fire. So this dependencies ECLAC this is the latest one you just added in your product and just keep on saying fixes. No, it seemed enough. So now we can use the fire base fire this year. So you do this in the next lecture. For now, we have set up the fire visit of it. We put the material to save the name in the five. It's OK. We'll do this in the next lecture. Now, this is a target. Thank you. 19. Understanding Fireabse Realtime Database Methods And Setting it Up!: Hello, everyone. And welcome back for now. What we did is we have created a method called Saving him in five s very time database. I use this to save name of the user in the fibers. Okay, so therefore, saving the name in the database, I want to show you this structure of the date of its. OK, so that data structure you should know because this is new to you on this will. This will be very helpful. And yet you change your okay. So before some meeting our data and the data base, I want to show you the database structure. Partly cr Pontes earlier. This is already control. And in this you can see that there's only one north, which is not This is the route north. Okay, this is that would not currently destiny for you. This name would be different. Okay, so now we're going to do is I'm going to show other detest, actually. Okay, So are fire with the restructure. Hagar has a root node, which is the first. Okay, in fact, will be this one. Okay. Just like and for you, it can be for you. It can be different for each project. This is a good thing. Okay? This is different. And I'm Dag under there. A draught Nord the child which will create We will create its users. This will be our known. Okay, this real clear. So we'll put that in order here, which will be used. That and then the structure would be something like this. I never use that view. And some may you you I'd even What is you doing? This is the unique He was that idea. Okay, which is generated by fire bits Documented. You could This is the friend party chooses. I thought this is used basically for Inglis. Indexing used basically for indexing that user details. OK, so the fasting what we'll do is we'll put this and their users. So this is the current to use that log in. I d. Ok, you can do more here. I get there to users who have signed up for you. This will be then you did or did you do? This will be some some rain coming playing like this More so than they did by Apply it a bit and this is used Cool. This is used to war. Distinguish between different users and it is all too most Leo's. What? Indexing in next thing the user data and fire this. Okay, this is very important. Okay, For each user 500 different diabetes and then we can combine. We can use this. You i d and act the details under this You Idoko So here really first rate the name nor were writing the name? No. And that there's also on wards in order, actually act in this north north. We love the friend details about the No, it's OK. We call this in the next section for now. You you i d one will have a name nor inside it. Let's just do this. So if you haven't understood, feel free to ask a question in the creo in it I love resigns as quickly as possible. So this is the This is the structure of the find that would nor did this one okay on for you. It can be different for each product. This is different and another would know the child which will creative use and so on. But this use at all the users will decide okay on these users that identified by you like deep it'sa Unique ideas generated by fire base on which is mostly used for indexing. Okay, so we'll use this and under each, your idea will have the user details such as name and they're not created by and then not created by the So for now, let's just make the name you can see here. We have already pull the fire base to pregnancy. Okay, Now what we do is region will write down the third floor. Five a state of siege chewing the week regard. Regard very weapons to fire vested. And how do we get the instance off this again? Getting stand for out Also what we did. Five. What? Don't get instance. Okay, so you did the same. Now you get that data visit reference. What is this? This is their friends to your data vis firebase databases. As many methods get up, get a friends, get off. Get on. These are used for different mentor looking for the friend thing. So for now it will do is get That depends on what is this reference, etc. This is the princes. The friends gets a date of the weapons off the date of his route. No, now what is the root? Nor via I would notice this. Okay, we get girl. Got the reference to this. And under this what we're going to write, You've decided you're right. What they're going to put last. I use that Nord. Okay, so what? We like that friend dark. We put this s ruled reference. Okay, Now we'll create one more reference here, which is the name reference, or does this name reference This is the name under this user you are doing on this? Okay, so how do we do that? God, dude reference, right? What is route this? We got the route, and then we go to the next time. What is an exciting which is users of year getting users, Terry looking. But the issues that were not created in fire base. So what you can do is you can see this as a creation on Sochi. See, when you reference this and if it does not exist, issues on one I created. Okay, so for night is not there. But when we some Megan him, it will be there. Okay, so just write what? There was a child. We want you name it and then here. What we need you are doing What does this? You know, I do on you the cutting to use that idea. Okay, so what we do here just past the user object to this matter? Because we need them. Use that idea for this. Reported here. He got the user object. Now we can use that. Use that, Doc get you. This will be the car Indios. And now area you had here for us, then we're here. Okay. Now that this year we want to go here under this. You have this on under this. You want to go here? Okay. Vehicle here. How do you know that again? Right? Child? Child, What is this? Name me. I didn't lucky guess. So the name is there. Okay. God, Now how do we set value? How do you like this Names, Will you do got Indios f name. Okay. How do we do that? It's simple. See, we have saved the name in this astri Wright. Now we use that. How do inside traders and see what comes in your mind when you set out of value to the difference just right side. But okay. So just now what we have done is created a mentor. You've got the fire with date of his first date of reference, then rode reference. And then the name. Okay, The value to name on the upside, the value to the need name is what desisting, which we have on this country is the name of the user feelings. And you didn't expect one. Now this is it. Hoping administrative didn't understand. And if you have any problems, feel free to ask in the Q and A our land Andi never hesitate to ask you when the simplest out we're trying to learn you so people will ask anything you want for now. This is it. Well, done it in the next lecture. Okay. Thank you. 20. Saving The User's Name In FIrebase!: loin. Welcome back over here. So as we saw in the last lecture that we have said that I loved the name, we got their friends to the name Norden fired his data vis. Now what we're going to do is we're going to run that and let's see if it works. We're going to sign of the user. Simply sign up now. Okay, so here I'll write my name. Let me give my i d. Quickly. They're signing up now. If you consigning, it's signing up. David looks, we have successfully signed up. Now you're successfully signed up, right? How do we know that we have successfully signed up Bill c The name here in the name nor very ill. See who is in the file with data. So he area in the fire was date of it. See, this was not there previously. OK, when we clear to the name it again, this is the you idea. How do we know this is the you i d for the current user? Let's see, for now, you have just one user here. Okay? Which is just me. And my emulate is there. And this will generate a user. You ready for myself. This is the use, Everybody you can see here and this matches with one here. Right? So this your idea? I've used to differentiate myself on the other users. Okay, this will be different. You I d will be different for each user that signs up you time using that. And then we put the name here. What is the name? Moment? Simple, right? Yeah, it's that simple. But the method I wanted to ask you if it's simple or not Simple, right? It's very simple. We have the route that the users are user system that we create under this Users, we have different new ideas. Okay, for now we have one because we have one. Use it then in this you i d. You have the name here. Now you might be wondering how we like the North's here inside this. You I d Okay, we can add it in the data lectures and we can also do We can also add my people north easier. That is the beauty of fire. Like once you have created this north, it doesn't mean that it is certain stone. You can act different words here even using the console. You can see the day that actually you can simply right here for now. I'll just tried something like last. I mean, I last name and here I write something. I'm just actors. My last name would be something I hope. As you can see, we can write multiple giants here even after kid in this that servile visit so powerful. And that's why it is recommended to learn it. Okay, for now, I'll just delete it because we don't need the last name. So you understood, right? How it looks right on the for the next lecture. What we'll do is we create a home activity in Children named we want to show right or the names we have saved. So in this, if we log in here, you can see that there is no name showing because it is still trying. Previously created activity which waas usar contact witty. And that did didn't have a name here. Okay, I'll show you in the next lecture. Harto, get the name and the the next activity. After this, we create some other activity and linked back to the floor. Okay, so after log in, the user will see that activity. If you want, I can just create an activity on now just to show you you don't like quickly. So this home activity will have the Nords and everything. And this will also have the name of user. Right? For now, it just opened up. Okay, this will protect text to you first. Okay. Have you ever takes two? You're saying welcome home and we'll show this home activity after this long so fast contained in the splash screen activity. So if they use a log, then we'll go back to it here. And then you do There is not logged in. We're showing log and activity. And in the log and activity after the logging is successful, get opening the user contact to it. Easy, right? I'll change it to hold back, dude. Simple leg. So now we'll just run it. I'll show you the moment to do too. Which I'm talking about. Tell this log in here quickly. Welcome home here will show the name here. Williston North and everything. So for now, you created this home activity for the user. Okay. We'll see how to get the name here in the next lecture. Now this is it. Thank you. 21. Getting The User's Name From Firebase: Hello and welcome back out so you can see that I'm roaming in our home. Years like this is our home, Leo. So you can see that there's a text here we have return. You're welcome to home. So I want to change the style of the sticks. I wanted to be more appealing. So for now I just change the style of the stick. I just see it and you can also copy this time. Yeah. So year this. You can see that now The welcome Texas. Better looking. It's what? It's looking nice. You You might have noticed that I always focus on your way also, because it's very important when you creating your own app. Are you representing in a Brookline in your company? Okay, even if it's a broader type, I say U n if it's a prototype, you have to put good layout minimum things you have to do to make it more appealing to the Klein Dada use. Okay, so for now you have decorated this text view now well, more to the home activity here are tired. Sick previously like what? Or what did I say previously here that will get the name of to use it here. Right? And we really protect. Enjoyed here. Just name. Welcome message. Will you come? There is no okay for this page. This is the welcome message. Neymar Day visit in that Well, come and that's a Jewish. Okay, first, like me get double come message. I didn't hear All right, on like it takes. Okay, so we locked it. Now you're going toe. What really good name from the fire piece. Okay. How do we do that fast? Will get that firebase data obvious. We need the data with reference right toward a little fire. Base data is not get instance. You got the object of the five database. Okay. Now, we'll use this to get our database reference. Friends are want rude reference. What did the route reference. We talked about it in the last lecture away. Fire based Arcata. So this will be our route. What is this? This is that happened in fire? Best simple right now. I really do. You it. We need the reference to the name where his name store names toward it on his name is stored under the road inside users under that we have the I D u i d And inside that there's a name Did you want? OK, Gorda will go the same way. How we went here under this under this under this and then don't Okay, that would I'm the users and the u A d via the name. Okay for that You i d We need the current user also, so we'll just get planning to use that here. This We have done it many times, so by abyss ought not get instant. Okay, so they should look now to get the name. What? We need to do it. Goto that a prince of the new What is the name reference With great One more year reference . It will regard name reference. Now you go to the root. Were in the room on the route. What we need They use us Well, right Giant use it. Don't make a mistake in the spelling here. Okay, Now what we need the u i. D is the u i d father, What is the u i d For the current user? This book it and this can mean aller times. Okay, so you have to be very careful then You clien porta exception got here. Drags try block here for now. We'll just leave it and we go toe that What occurring? To use their idea of God. And inside that what is their name? This is the name of the Lord. So they just tight chide And now I regard this Okay. You got the name reference now in this era French port A read operation are doing well Read video through these methods plus matter days ag listener Forcing a well living. This is useful. I had a list for single gene in the data. It will be triggered once with the value of the daytime location. This little bit regard only one. Okay, so we want only ones. So we can use that. Or you can. There's a second method which is called like child event listener. So there was a child inside this name, another name. So inside this name, there was a child. We could have used this matter Jagna to get the changes. Okay, this will you get back The child, even listener really get to that on live in the UN's happen another time And when the you enter happened okay, I don't remold changed any when that happened and tell this matter. And there's one more mattered Cordite valuing, listening. This will get triggered every time this value changes his name. Really? Every time this is changes this little girl automatically and this will get this Will you get triggered automatically on this will update the you. I also okay, if you have the U. Y. Functions inside this, I'd really your business ID. Well, you and listener. Okay. So for now, we'll use the single well urine because name is not changing. Name is not a child which will change. Name is not a value. This virtual change every time. So, for now, is your single enduring Klitzman. I just use this and new. They're new and listener. So the fire is is provided us with these mentors. This is on data change. This will be triggered ones in this, even if the data hasn't changed because this is a single while doing that means that it will be triggered at least one. Okay, so I just coming to you this will you get trigger? I need one. Took it and on day 13 will be triggered. Or at least once. Now, what is this data snapshot. This data snapshot contains the data which we have Where did for here? What we're equating the name reference was this will get day testing up short, will have the new difference. And what does this date does? Not sure has righted here they test snapshot will have for this case. It will have name Oh my It will be something like this. Okay, but for your understanding I'm saying whatever your friends, you Kuwaiti this data snapshot will have Okay. Could be a query This get current to use a variety then also you get this. Ok one. Now this really be having this. Okay. The key will be named on the value of a big one. Okay. How do we get there? Name. Welcome message to set the name. You text right high. Will you come and then we'll right, They does Get your doctor Those okay like an exclamation. So let's run it and see if it box will run it in the next lecture. Thank you. 22. Showing The User's Name In App And Further!: so welcome. As you can see, that in the last luxury have created this matter. We have got the name reprints. We got the value of the name he was in this get value. Okay, because the key was would be here. Name on the value would be Okay, So we got this. Now you're going to run it bank. Let's see. Blackberry. Yes. Oh, yeah. Nights of dignity. So you can see that on one is no. Will you come did that So you can see that How were successfully? God, the name in that It successfully. God, I d is here on duh. We also succeed. Believe Arda. True Dad took it The new reference. What do you want? One The route. Okay, Exactly. One of the child use us in that guy that use us. Really want to use that Going to use us? You i d And then we want the name. Okay, we went through this B I did a list. Careful this or did this listener, This is nothing but read it after weapons. Okay, these are the listeners with educated to read that offense again. You can read about it. T Thank you So this is the listener which will give us the value, opta reference. So we got the value of the difference. Right? And we have created successfully some material data and the fire base and retrieved it. Okay, this is a big step. So we have done the basic model which will be following in the north. Okay, so this will be repeated many times in many forms. Okay, but this is the basic off. The five is retrieval on some mission off data. Okay, so in the North, sir, what will do is real ag the North, and we like to title in the notes hunting, and then we'll recruit using such methods. Okay, So I hope you like this small example Now you want to the next step off the scores, which will be writing Northern. I didn't know what the leading north and fighting them in the home activity. Okay, what is the whole duty? This one, okay, enjoyed here. So we have already done the basics of the fire base and basics. Other five database homes on the next steps will be using these This getting stands Gate of friends. Okay. So get accustomed to it. get family relative. I will use these methods also. We'll use the diameters also. What? We're that mattered way. We will use my tights card. I heard the living listener also because this is very important. This gets triggered every time there's a change in the date of his location. Okay, so he used these Also, we used these also I try living you and listener. So it's your Listen the next table off This of course. Okay, so for now this is it. I'll see in the next lecture. Keep learning. Okay. Thank you. 23. Creating The Layout For Note Taking: so welcome back out. Previous section What we have done is you have created a welcome message here in the activity home. You can see you. So now what we do is really go with creating the north first. Okay, Now what will do it? Plus let's CDA section objectives. Okay, so in the section objectives, what we have in this section is really learned to create north activity on and created in order to ity layout also, and then we'll save the North in the fire with the time databases. Okay, so the next step would be o creator, But then here. Why? Because we really open a new activity on that button. Click on that. Activity will be off. Create north. Okay, let me just create this. But then quickly tell you see this bartender, But I d I put it in bottom off the layer because I didn't want to make it somewhere here because it will over love it north, actually. Which we will show here inside this. Okay, so I put it in the bottom on on the click off this spartan. What do you do it on the click off this man? We'll open a new act to be joking. So let me just put a little is not here open. Could he ignored, right? This is it, Right. On the click of the button will open. Did North activity? This provides something. Do it right here for now. Open. Create more. Yeah, Hostility toe Create that. You know, like to when you call yet simply click here. TZ likely Just call it an activity first. Good. That activity I will just started on the click of the button. What do we do? That simple intent. It's created direct, so you can see that Create Morton Do it is created Andi laundry and we click on the button . So unlikely conduct create more button This activity will open. Okay, so these are creating activity. So here I'll just quickly put some I did text because will be needing them Flood creation of notes. Okay, so let me just quickly create them creatively out for it. Feeling the title of the north Here, make me just zooming. You can see it, right? Yeah. You can see the title of the northern length are here. Then we'll right the north here and then click on this and then we'll save one click on this in the fire base. Okay, When you click on this will take the value of these and save it in the fire. So one. Now, this is it. In the next lecture, what we'll see is the structure of our notes. And how will we go about saving the No, it's OK. That will be I'll have next object to see in the next licked Erica. Thank you. 24. Understanding Our Database Structure And Setting Up Method For Create Note: so welcome back, everyone. And now what we're going to do is to get there, get the elements off the layout. Okay? We'll get the elements of the garden or activity just good. That difference. But you get no title. Fine view my idea by Did God, no. Similarly will get the north content. You got it right. The North will have two things. First will be no title on the second would be not wanting regarded. And now we get the button create, but okay, give it dad and friends. It's a button. Simple life. Now what you do is we put down with listener on this partner here. What will you do? What? North, then find peace. Okay. Did this attack created this? Okay, so on the click on this button, what we'll do is put the northern firebase. So what will we need to put the button? And to put the northern fire is five is database first? Like now what we need. We need the firebase date of this. I read things. So we need data base. I have been to you Or did this reference This is ruled Raffarin's, which we did in the previous lecture. Also, remember what was the route and make sure you're there. Old ones. So this is the Okay. So our north will come inside this route inside this user inside this user, I d. And here there will be a notes section and then inside ignored. We love the north that we show you this tractor ones so you don't get confused. So are our north structure Will be See I told you, right. Our data is actually something like this. This is the route north. Okay, This one. And this is the USA's, which we have created the Nord inside the route north. Okay. And then we'll we have created another north, which is you. I do want or is this This is a guy degenerated by five. Ok, inside this you idea. We're already got name here. You can see you got the name right. What the next day would be the next step would be notes. We have to say the notes give it a capital name. Yeah, so this north north we will have inside this northward. Bolivia. We have just north idea one on No, tidy. This is Himmler toward similar to use that idea. Okay, this is also are generated by for 200 by five is okay, five. Isn't it unique case for us if we don't give a key. Say, if you want to save something inside this note, okay? And you don't want to give you your own key here, So if I was a generator key for you, Okay. So that's Ah, good creature of fire with on then inside this north idea on what we're saving or title and no contact. Okay, this is what we're doing on or died. It would be no title again. And title conduct. And inside the North, I agree to same similar thing. No title and no. So in north. Nor the structure is something like this. Okay. Similar to the user. So we are in the root here. What is the root regard? That reference to, uh, adult here. Okay, Data is true. Now it will get. Will you get that offense to the North North Reference Dark Child. What is the child? Use us inside. That which user current do the right kind Do that Ideally, Steve. Yet here we are everywhere on this. Then we came to this. Now you want to go to this because snorted inside this, right? So I don't know where it will lead the current use. Alright, How will we get that? It's simple. Will get that user first quarter back. Five issues of cutting firebase ought Lord Winston got get going Deals simple, right? And this kind user really give esta current. You idea. We got the u I. D. Now you want to go to the north section? We have the North reference? No. So now we can do it, right? We have done it in the sign of activity writing the name you can see here we have it in the name here in the fireplace. Right? So value. And But here's something different. Can you notice it? You can see this tractor, See for name. It was easy. You have to go to the usual I d against. I'd always and then we go to the name and then said some value to this name. Okay, But here in north, we have Children. Nords also carry a child. Since I does not, we are You need generated idea. And then no title, no contact. So you can see that it is different from the name. So the saving mattered will also be different, right? We don't the name and fire with using said will you? But we can't do this. I'd value again to save this north. Okay. By a country savored using site value because set value for cleaning the key. OK, And then one thing also is that SEC value update for all this divide. Right Said value off more to something then if there are more north inside the north t there to notice here. Right, So these two notes will get updated. Okay. So simply v kinda said hallelujah to give diet he also on How do we get diet d and I'll do we save this complex structure? Ok, this is a complex structure. This was a simple structure name. Okay. How do we do that? We'll see it in the next lecture first, how to save this, Nor Okay, so I'll see you in the next lecture. Thank you. 25. Putting Note In Firebase- The Incorrect Way!: All right, Welcome back out. We had created only out. We had already created a method called Put North and Fire Base, which will use to create the north in the five. Israel ended its OK, so here we've got the north's elephant. So what is this sort of friends? Let me just tell you want This is a route, OK, this is a bedroom. It's like use this. Okay? You, this and then how I use that I d card and do the right thing. All right. And then inside that notes. So yet? Yeah. So a year, If you want to say, even know, knew not What will do We create a new north referent. And if you're thinking that oldest north is not dead here right now, you can you remember, right? This name was also not there. But when you put something in the fire base, if the North doesn't exist, the fire is created for Sabet on or some feature of the fire with Andi will use that. Okay, so you know, even though notes is not there, it will get created when we put it in the final. Okay, so for this new north of reference. So this will be this reference would be something like, Let me show you. It will be something like So my deal were some I D Jenna, They did by five, please. Okay, so this Northampton's would be that. So how do we get out? And nobody could buy side of this. It's in Blue Dye north. What is this push? No. So this book is You can see that this booth 10 dates unique. I d and give you that idea so you can use that to save them? Not in this reference. It's how I d this post will then and now we got better friends today. So now. Yet here. We're already here. Here. You got the North's reference. Now we got the note idea this this benefit of a cancer. I know I d opera generated by five c create elephant Owen or pretended to tell the child years and the declines and incorporate an estimate of this out of us. I am for starting but buses. So this is created on the clients. I mean, this appreciated in viable only. And then we'll send. Did that do this? I see. Okay. Where is this idea located It is located inside this north reference. Okay, so inside this not this idea is located. And we got the ideas I visit by this one. So we have created this record that offends toe this push. You got very friends. Your I d. Okay. How do we knew North, Nor does said values him provide well, right? It does not. I did. What is the North cited those things similarly right. We got the not content now. So now we have here in the home activity. We see that welcome woman is there. We just create a note. So now I'm telling you beforehand that this title will Sure why it will not show up in the database. I mean, because the said Well, you Devon, work like this. But I'm just making this north to show you said you walks. Let me just create the north. We have important. You're completely snowed here. So we won't get any feedback as to if the north they saved on in the fire. Based on not so. Let me just open the fireplace. Tates dead. It is. What is it with the same? No kind Or did this This is some random stuff. Why? Because see, Viet saving year. You okay? Second lives value toward value to the this reference. So we have said the value. All this idea. Okay. What is that? What is this value note? It was no title first, and then it became more pointed. We can't save a complex structure like this because they value updates of data. That idea which we're doing, Okay, We want it to be like a child here. You want to relay something like this? This idea would be here inside this idea. You won no title, and then some title would be here. And then one more thing would be that will be some grinding. So we wanted to be something like this. Okay. And it's not coming like this. Okay, So what we'll do is really need to do something else, right? This side really was not working here, so we'll see. How would do that in the next lecture? I just showed you this wrong example because I wanted to know what will happen if you do it like this. Okay. This is not the correct way to sometimes to learn it in the correct way you have to do it in an incorrectly. See, we have done this. So I list to move this and remove this soldier because we don't need this in the next lecture will see the correct OK? And then you just analyze out. Do it. And what? What we did here on what went wrong with that? Okay, read a power read up about Set also because it is very important and we lose the certainly in the next lecture, but it will give us the right values. Okay, I'll see it in the next lecture. Thank you. 26. Create Note In Firebase - The Correct Way~!: All right, I'll come back out here, be of Lunde incorrectly on. Uh, we have created now. You fixed it. You believed it wrong data that we got in the database and I will see the correct How do his door complex structures such as this North? You might be thinking all this is not accomplished. But it is. It is right. We want to put some i d here. So we got the idea in this idea what we want you want. So no title to come and then not content. So when we're using certain, we need to submit this whole light ones. Okay. What do you doing previously was here submitting the north tighter, and then they're not going to try, so that was causing a problem. So what does this looks like to you? This could be an object. Like what would be a class? Okay. It could be a last inside the north glass. We'll have these stool properties. All you can see. Yeah, properties, this property. No title. I'm not. So what we'll do is we create a note class by were by lie repeating this more class because we want to some with this I'd want if you use that value. Okay? You to you. I tell you, if you said value, there's an object here. Okay, So object when you previously when we're some meeting name be some Madrid. A string string is in itself an object. And we wanted to just update this name. Now this is a complex structure, okay? It has live 10 years. Okay, Does it by telling it as 100. We can't summit bordered one, So I will be. But we want to summit board. How do we do that? We create a new class and then some redact object off this class with someone. It's very easy. You can see here it takes an object so will create an old class. It will have these properties and will summit in the fireplace. I the beauty is the fire basically distinguished that there's no title will be a key and this is its value. On this, no 100 will be a key on. This is its value. And it didn't some midget problem. So fire base can read this class. And these are usually called Beau Jo's, which is just playing or Java classes. You can just created here. You create a north class. Simple. Okay, No. Plus you give it properties. What were the properties thing? No title. No confident. We'll just create something that doesn't said death. I'm quickly creating. Get doesn't settles bodies. So this is the gate inside material will use toe. Get the notes when we try to the no from that five is for now, using for now. We'll be using segmented. Okay. And we'll need a constructor. Also five days needs few things. First is a blank constructor. This room, this is a quiet flood. Fire bits. If when you face that a time you don't want anything, then you can just get this. Okay, But mostly we want something. Okay. What do you want? One. Both of these things on your fate started, right? We'll fight. We want both of these things. So we'll use that. Used this toe, Create a new note. Simple. So we have to get that insider on this. Classes created. No reported now. Create now create not activity. Now we'll go simply first create an old object. How do it here? New north, new north. And here we can write or did that north title that get takes part two string And what contend are get take start. Did I do here? I put the title here. I put the country. And what is this Constructor? We have created it here. Ok, it is being used now. So this is our nor doctor now. Do we submitted simple You know that Dock said value. And what is this object we need to say now? You know now we learned on completely This will solve murder. New York now on completely not know that are this is finished. Okay, so what will right here if store is successful? Simple. A lot of other things on my mother's not submitted five years see for you is that we don't need to show five days. But for now I'm writing you fire this because we are David some Okay, who will write this? And then we I will go to the Create north. Simply write This title will now show up. Okay, They show up in the fire base and this north. Well, all so to help you five. These this create north north submitted in five. Okay, so we can see now the Norden, the fire Service T regarding. Can you see it? This is the title. This is the contract. Okay? These at this came later because off the also practical order. But if you want to fetch, you'll get it, nor title and content boat. Okay. And now you can see that our date eyes successfully submitted and that this note okay and we can create my people notes also. So I show you attacked out. So let's just go back. Yeah, so here, let me just created more for myself. What? I want to teach you guys in the next lecture next section because we're done with done most of the section year we had done this. You have done this created a lot and save the northern live. So we're done the dissection Now in the next section next section like for myself. I'm making a north here in the next section. Where do you go? Show this north in the Okay, my shoulders Norden And? And what? And tell about the fighting off data. Calm Quiet, please. Okay, so every fated then only into it like I just enjoy. So this is the north from Isis created a You see if it is good ingredient, not someone didn't fire. Let me see. Oh, it's the t show this north in that tell about that until about the freighting off. A tough No. Five. This simple right on no title is an exception. So we'll do that in the next section. I showed an order in there and tell you about that Fighting off that is very important on way have done one of the most important things here, some meeting a complex state and firebase databases. So that is a big one delivery of finished. Now the another big, more duelist fighting the data from the five. That is also easy, but it takes time to get the grasp of things. Don't be afraid to ask any questions. If you have about this on like you, any is always open. So feel free to ask any questions. We'll see how to show the North's in the okay in the next lecture. And I'll also tell you all to fit to the data from the fine again. So I'll see you in the next lecture. For now, I think this is it. Oh, thank you. 27. Reading Notes From Firebase: Welcome back out. For now, what we have done is we have created a notes activity where you can create a north. Right. And we also finished some meeting there, not enough fire base. So once you have submitted the Northern Firebase, we want to finish this activity first. Let me just put something to finish it because we don't want the user to stand the same screen off Does a meeting the North Place. All right, I'm gonna text or Okay, finish this activity. So we have done this. Now what we're going to do, we're going to move on to the next section. What is the next section in this section? What we'll do is we'll create way have already created the north and fire base. So now what we'll do is we'll get the notes from the fire base, will fetch them okay. And then really sure them in a recycler view. If you have familiarity and right then you must know what is this Eichler you? If you don't know, I'll explain when we come to this. And then really? Sure. The North's and that home activity. All right. Three objectives, simple ones. We'll call this in this section. Okay, so let's just start with the 1st 1 The 1st 1 is to get the north in the home. Activities like me. Just open the home activity here. Okay, so in this what we're going to do and this Lords, what we're going to do is they're going to get there notes from by this. Okay, so here we like him 1/3 card read. Not now. You've created this matter. And this method, or it will do is I read the notes and fire this date of it. Simple. So how do we need it for reading the firebase database? What we need to do is first goto these notes. If you want to read these North, we need to get their friends off. This North's okay. No, it's north, right? We have done this in the previous thing. Also, what was previous thing? Create note. We got a lot of friends like this. Okay, North reference. We got so far. Right thing we got that right now for reading. Also, we need that. Friends do that. Okay, So what we'll do is we'll again get the fire based database. Okay. Now, either the date of his reference. Simple right. The North, sir, Friends will get it so far. The North Reference. What do we need here? We are in the road now. What is the road simple. This is the route right now. We want to go inside this route. What is inside this route? Users so far tonight. Dark child. What is the this inside you? That's what do we want? The user id occurring designed. So how do you get the current user I d to put in this child? We need to get that going. Do that first. You're seeing the line of thinking here. It's very simple. I've is locked, but get instant dark. Get current users current to use their dark or Davidow get right. So now we're very here. We're here now. What we need to do now, what we need to do is go to this notes, right? So we'll write giant notes. So as you can see, this is very similar to what we didn't create. No, Tilly. Eric is ready. Similar Right. So now what we need to do is to read the North severance. How do we read it? See, we need to airlift listener. You can't just right? Indeed, it's more. We have some methods here. Okay, We talked about this matter, right when we're getting the, uh, getting the name here so you can see regard the name. How do you get it? Using up ID listener for single. Well doing this is what does this do? This is triggered only ones, that's where discord, single living. But at least once, it will get triggered. See, you can see this trigger. It will be. This listener will be triggered one for the alley of the type location. So for this name, this will be triggered name for the new reference. This will be triggered each time we opened this home activity at least once. This will get triggered. Okay, so this is one type of listening. So what other there? Types of listener. Let's see. Not bag. J. Lewin, list mercy. This listeners for child migrants. Okay, so if I may got change in this giant loved is north. Okay, so I feel I tend the title of this north here. This is the child of this north, right? So if I want to read this genuinely not the whole thing, then I will write notes for friends dot Actually went so in that case, whenever I changed this title that I live in listener will get get to guard, OK, And what is the last one by leaving business? This one is triggered ones. And also every time the data teen is okay. So it doesn't really believe in what was a good win once. Okay, Only one second trigger there will be no regarding you. And if we changed the name you any region in the north? Okay, so you want a fight in the name to something else? This one won't get triggered instantly. Okay, this will get triggered if I closed the activity and then open it again. Okay, So the last one is I doing this right? So this will get triggered every time there's a data change in the child or even in the great allocation. So if the child gets some new value, this listener will get trigger four. Or if the North's Nord itself changes, then also this will ejected. So what we're going to do is we're going to be a greeting the notes later in the returning the lectures. Okay, You fall there in this course. Okay, so for that we needed to be updated. We need this to get triggered every time there's a change. So what do we do? You can use chai limned listener, but I think it would do better to use were the only listening because this will get triggered instantly even if we change the you. And if we I did not hear like the style living listener we were triggered when the Children have some genius Like there's a change in this order visiting in this But when we are not here, we wanted to get there so we'll use a leering business symbol like new. So this is like this on the agenda Gin regard this right. So this is returns our data snap short on this date. I snap short. I'll right here for this example our notes, Example this data snapshot really contain See what is under this North's or snort two notes . Other. Right. So it'll contain what I d one and then inside this it will going then More titles, something some tighter I and then no content. I can see you. Okay, But it will also contend us. I can. No, not all. Or did this. I cannot do that. I don't. I did, too. And then same thing, Some contending some title would be there. Right? So we want this do test snapshot to be treated right? This doesn't have shocked will be treated by us. Okay, how do we trade? We won the first norn first than the second so far that what we'll do is really use a 42. How do we do that? The light for data Snapshot Nordeste. No. What is this? North snapshot. See, this is also date. Doesn't have short this thing until yet. This is also data snapshot. This is also just anything which contains data like key and value data Snapshot. So this is a bigger snapshot. This is a test. Okay, So that smaller ones or big this is these ones on These are inside. There does so for each nor data snapshot, Which means in order does not started this. Or do you get this? Get Children. So we looked. Rita. What? You'll run off this Well, did you learn off this? What I d one and then Or Tyreke? Right? So we looked rate all these Children until there is a note snapshot. That is not what I do. I know no title to be militate. Each one of them and we'll save the value. How do we save the value? It's simple. We create a north class. I just put this outside off it because in the follow, we don't want to play a subject. North is very north shot. Get well you and will you pass the classes by every passing the class? This is the beauty of virus. If we pass this note class or doesn't know class has Okay, let's see it as the title. And it is the country. So this title and the classes title really get Linda, this is done my fire. So this method you can read here, get value written the data contained in the snapshot and pull this type off argument, it will link it to the class. So what we'll do is simply regarded. Now you want to see what is there late? More right, So we'll just bring this, okay, we'll put it in logs. Also my note. Then we'll right this logging. You must know that this will show up in our block this statement took, The stores will come up in the activity, so let's just run it. Let's see if it looks so you chose next guy. A section showed this and then the next one is also show, I think didn't show. But you can see in the law cattles. How do we do that? We'll write my notes here because that is the tag. See, I'm teaching you this logging also because it's very important. You can see both of them. See? Not no title. First ones. Who is what? This This title will show up in the file with content. It is this one. Sorry, this one. Okay, this is the last one to the sexual fast. You can see here, right? And the same goes for the second show This the next section by section. Show this haunting. So we have done the fighting part. Okay, so you can see it is getting fetched. What if I change something? See, we ever did of a Lewin listener, right? And I totally every time there's a lieutenant, this will get triggered. So what? They're changing toe. You continue to your ward. This will sure changed. Changed up in that. Let's see. Does it get to go see a doctor that you can see you? You can see the time Also, this was two minutes back. 16. 18. And this is 16. 20. This is after dormers just did it. We changed this. So all of the notes got fetched. Okay, I can see you shored up. Changed up in the same to give me a is in this last. See, this is the firepower of fire base. It is very, very quick. And it's really, really time. There's no day lender and this is this is very powerful. And if you want to create your own app, this is very useful. The changes come off very quickly, and this is all without a stating of any server. Right? So this is the beauty of fire base. And this is the power off who will serve us, right? So now what we'll do is we'll fetch that notes from the families and the next thing will be showing these notes in the fireplace. So here, what we'll do is a writer after this one, right? Judo. Straight up. Fire. This set up Leo, not five best. So I doubly our talk. It does. That is our next step, right? We want to show these in the this here after this against like this. So will she will see that in the next lecture. For now, this is a sighting. If you have any questions, we free to ask in the Q and A section Anyone off since the Reliance Eric as soon as possible. So now I think this is it. I'll see you in the next lecture. Thank you. 28. Recycler View Plus Adapter Explanation: Welcome back out. And the previous lecture, What we did is we faced the North and now you want toe shoulder Nords and lay out. Okay, so our home layout Let's see what we have there. We have the create known button on We are the welcome message. Now what we'll do is we're going toe may carry cyclery. Why? Because we want a custom leads to you for that. The cyclo view is the best. Okay, Plus we need recycler view, so we need off your opponent. It Let me read them. We'll use the material. Er then we need a guard of you because I'm going to show each Nordea not guard. Okay? Okay, now we'll just think it Okay? Dissing now we'll have the these I love you here. See regard to drink Reporter Afghan Painful now Participatory match pairing. I'd be just align it first quickly. Okay, it is aligned. So we need to rebuild the project just to I have this show up here. Okay, This is not rendering, so I'm just re willing it. So while it is evil thing, let me tell you about Howdy Cycler. You works okay? So you can see there. Let me explain or recycler view on how it works. If you are new to it, I already feel that you already know this. You can skip it. But those who don't know let me tell you about it. And even if you nor the listen, do it, maybe you'll learn something new. So the the cycle of you was a red India home activity, Leo, right? We have just I did it. Okay. So instead, inside I neck to do in your area the cycler, you What happens is this recycler view in the thing. But I'm mortified Lee view to show items in a list or a great or anything, right? So how does how does this recycling of you know which way you you want to show your items? Okay. Yeah, we must have seen lest items which come in a list. OK. 1234 It will come like this all you have seen. Ah, image, reality. Where the layout is great where the images are in grade one will come here and then one will come here like that. Okay. Are you You have seen this list? You were one item. This one I don't This okay? Doctors are linearly. We're one. I don't is about that. That and the next one will be below it. And then so on. Okay, so that is the linearly are which is used most popularly and we'll use the same for our our epoch. So how do we provide this recycler you? But that's style of the layout which will Billy near or greater. Whatever. It will be our do it. How do we tell the recycler you use the nearly hour manager? Are you? You can save Leone manager. And if you want to do it, Lee nearly you call it the nearly out manager. And if it does great, great would be like something one. I don't want beer when I don't would be here one here. Okay. It would be no great like a net. Okay. The doctor in that we'll use Gridley, our manager. For now, what we're using is linearly out. Manager because we want to show the items one on top off, other right. Going to use this on our recycling. So this is the stop. Your top view off recycler. They're more details. If is women here. So inside this recycler you What happens? I'll tell you. See, this is our recycler. You okay? This green, Halloran? Okay. And in this we have the Lee nearly our manager. The act is telling that recycler view toe have these these boxes like this. Okay, one after the other. If it was a greatly out manager and these boxes will be side by side, one box would be here and all that. Okay. However, this pieces we're going to use that Lee nearly our manager. So the boxes will come like this linear. Okay, so that part is done. So now what happens in the cardio? Let me show. Let me tell you about that. So, ones, let's focus on this one item. Okay? One item off. Really recital of you. This item has to feels our in our kiss. Ok, more title. One more content for each new orders will be different. Okay, Title in content. Right. So for this what I'm saying is this nor Title one in North content. One our text to use. Right. So these fields are defined in the view Wheeler construction. Constructive. Off. What be it, bro are going to provide an adopted last year. Okay, which will be well inside to the recycler because recycler view wants to know what kind of items will come here. Ok, we have told you that you are turning items like this. Okay? Now it wants to know what kind of items will come here and who will tell that. But after we tell Okay, our doctor glassworks in that Okay, this field eso these fields are defining the viewer like constructor inside that after us. Right? So you remember this will revisit this diagram again and again. Every time you work on a doctor, I'll show you these classes also so fast. Now you can just listen and keep it in mind how it works. So view alert Constructor, we need do defined this type of textures because we're saying that for each item, Yeah, For each item, you have to have these text two years, okay to text. And if you want, you can put three. Also here. Three text two years or in a major whatever you want. But you have to define these fields And what, Bueller? Constructor. Okay, so the cycle of you will know that I have to I have to render these two takes to use every time there's only white. Okay, now, the second part of it, this is now the adopter wants to know that these two and discard this one. Guard this, all of this one guy beer, is it okay? We have to define this card. Something will create only out for this car. And then we'll provide that card to Dar Doctor on create the old. Okay, so in this, we order will provide this layout for one card. Okay, Then these fields will be defining the Bueller. Constructor. Okay. And after this, every time you add some data that they will show up in this form. Okay, it will set. And it will say that I tell in the country okay. And this kind of layout is repeated for each time. Okay, so how do we populate the data? That is also done by a doctor class? And in that there is a method card on buying view? Hola. So on my and we ordered it. The names such as directed Bynes binds What? The view holder port is the view older. This whole thing this whole classes are discarded of you order Okay, for our example. Your lot holds this whole card. Okay? And this guard, we have two textures, right? So we owned a populated with data. So every time there's a new data comes this be a bind. You holder binds that data. But this with the Styx telling with this content, okay? And And it will do this binding for each guide here. Okay, so that is how inter doctor works. Don't create the layer. It will take a layout off this one Guard, OK? And this is inflated in the inflated means it is created or filled. Okay. Feeling the own creator. What does that mean? That means that now that after knows every time a new item comes I have to show it in this layer. Okay? And these fields that we define in love you order because we want to tell that after that you have to update these fields. Okay? Now what we do is populated with it. How do we do that? We put the data set. A za are given the known buying you. Okay, so the bind were you order will take that data set and assign it to each card. Right? This is a three step three methods which are important in a doctor. There are more methods. We'll see, and we'll create that after. And I'll tell you according to this diagram, again and again, you don't get confused. And these are all part of our adopter class. And what is this? A doctor class? What does it need as an import? It just need that there does it right. This data set will be a really a really stop north Sonora. We create in a realist. And add these all of these north's these in the four lovely lard each Norden are released off. It's OK and then we'll positive in the end up headless and then adopt a glass will do its magic. When does the finding of your love the types of feel the layout of unguardable pride and on create? We will hold up and in the point Bindi over that we lied Process Don't. I had the data in the guide. Okay, so what we doing by Nor find the holder is that will take the title and cited toe this feel okay and then for content will set it to this field. We'll do it only once in the bind you holder on, Dr Repeat the same process for every child. So we don't have to write again and again. So that is a beauty off adopter. And that is the function off it up. Right. So I hope you understood this. We put the data set to that after class, then after class creates this layout off card, okay. And 40 each for the each of the eight asserted will create one more card on again and again . It will do and populated with data. Right? And this this holy card system, this whole card, Leo, is provided to our recycling bitch lasered out in a linear manner because we have used up Lee nearly up. Okay, so I hope you understand this. We'll do this in the next lecture, will create a adopter and recycler view, and we'll set it to the recycling view. And we'll do it right slowly because for people one knew it might be a new thing. Okay, So don't worry if you didn't get it all at once. Once you do this, you will get to the hang off it on. You will get it very easily once you start doing it, so I'll explain it again and the upcoming lectures while doing it. So just stick around and keep learning. Okay? I'll see you in the next lecture. Will create our doctor for real, then. Okay, so this is it for now. I hope you understand. Thank you very much. 29. RecyclerView Items Setup: so we'll come back out running this, like, totally doors positively said He's like, I love you, initialization. Okay, well, initial lately. So for that will give it some I D. Yes, I love you. This is already now you get it in the back to in the home activity or to do is before this read notes. Well, finally, Cycler view. So we're defining what it's like love you because still define it. Then we'll start adoptive flooding. Because this ad this needs in adopting first. You said the size of this is I love you. Side has fixed rates. This is not a in finite recycle. Every decision is fixed size. Now what we need to do is Sota Leo, manager, Right. This is there, Linda. The cycler view how to lay out the items inside it. Right? How to my knees item inside. Will they Will they be, in a great view, orderly near view how they will be mentioned here. Okay, you can see ours is a linear Leo. One on top of the other like that. Not a greatly out one insider off the other. So we're using them linearly. So for that, we need to create a lenient yard manager and provided toe are He said, I love you. So you're creating are the old manager. What do we Don't give it a soda. And he's like loving right. Sorry, said Leo. Right, So this is done. Now what we need to do is to do set a doctor. So before setting a doctor, what I want to do is certainly artful deeds. Each card. I want to create a layout for this card off the North Bay. I want to have this and then we'll create that actor and send this Lee our toe dart after in their own create your so this will be used. So first, let's just create this card. Okay? This will be useful later. So first, let's create this car. I'll go to the layout and creative, you know, like click. Yeah, Grasso's no guide. And in this I'll user this guy idea. Why am I using it? Because I think it provides a good look. It also gives you I feel ovda item. It has ah rounded corners. See it once created, created. So I changed this to card in Italy because that is more powerful and it is easier to align Gordon Italy out. So I've used that. And I created my card here and I'll bring it. Change the name to know card. Okay. Have created to text to use here. One is not content view and another one is north title. Okay? And I'm given a i d for this guard your so And these are our two text views. Okay, You light some north here. That is just a hint. Okay, So have created that Lee out for the card. No card vitriol port in our police. I clutter. You hear this guide Richer European going violence. So we'll create an adopter and said this card in the next lecture again. So I'll see you in the next lecture on now. This is it. Thank you. 30. RecyclerView Adapter Setup: Welcome back. As you can see that we're just about to say Die adapter. So before that, we needed to create an adopted by. And for that after we need a layout also provide for each item be appreciated that if you have seen this, this north is created right? So now agreed Do is we needed a desert for their doctor before creating the laughter. Let's create that day, does it? I have seen it in this diagram, but after today's date doesn't doesn't important. So what kind of returns that will provide It provided a list off boats. Why are you using a realist? We can use anything. But for this example, I think released would be best You need to know about data structures. So depending on the type of requirement you have, you can choose whatever day test actually want. I really started easier writing toe Adan Subtract item so I'll put the release. Doesn't input fall that up today? And for now there's a realist is empty, well populated. Where when were you reading the notes? We're reading the North Sea A right. So simply what we'll do here is yeah, let's just keep this toast and log. Yet here, what will do it? I ignored Buddha. Our list off notes. Simple, right? It's very easy to do. You just do this and hard. More Dari adding this more object, or does this north object we have created must have somebody from the previous lectures. So I got the value. Now we added to the list. Now what we need to do is first we need to create an after and then said laughter after getting the data. Okay, so what we'll do is we'll create thereafter. How do we create it? Vehicle here? Java. Okay, the new glass. Where does this course last? Court notes adapter. Simple name. We're giving now. What we'll do is the classes created, right. And it is our doctor. So it will extend what it said. The cycle of your doctor. Quarterly texting, I doubt. And this recycling your doctor takes up Bure little a class that extend of you order that will be used by a doctor. What is this view? Old? So for now, let me just write this. You for you. No notes, dr dot view. Okay. Why did I write that? Because I wanted to create my own. We old class I don't want to use. That is like love you Plus So I've created this. Then what I do is I'll implement the method of die. Doctors were telling methods on create the older on mind. We will be about this before these two and get counter simply It gives them number off a number of items in the list or whatever data's idea. Because then a lot of items and who does it give It gets to that after tells that after that this many items that there will implement all these methods. Right? We put this up, they should be up because we'll be creating this first and then this. What is it asking is make this explain? OK, and then we'll creator. Now what does this view or they must be asking? Firstly, you understand this, right? We extend the recycling yard appetite as because you want to create our own a doctor, right? We didn't want to use a simple adapter, so we created a complicated one for our complex that that I will care to don your doctor. Okay, so this extended recital reward after And this our doctor takes a genetic tape off T it extends. It takes an object off the view or like us. So this view of the class it needs of you order class which will be used by this adopter. So I created my own Leola instead of using the recyclers. Dot is I love you got older. Why? Because I want to define my on. I don't view your text view. You can see that in this there to text right where I want to define these myself. I don't want to use the redefined once because that those that are don't sort out Quite so . I created my one year older and caused this this view order with our doctor. Okay, this year order to this adopted. Simple right? Some now fast you What we'll do is I told you that on create the older What does it do? This layout of one classes created are included in this one. Create on create your I'll create this simple. We create a view first. No, I feel see this are created of you. I've related this about, uh, adapters item which, with this view, I've included this adopters item. But this view I see. So what? I have used this layout in later. Okay. From where do you want to inflate? So this context from this context what is this context? This is the activity context. So from this context, I want toe inflict. Why do we need this from? Because we wondered after to know what is happening in factory. You want to know what new data has? Beena didn't elect Okay, so we used from parent not get context And then we inflated it with this Leo OK, on this layout inflate mattered is what takes three argument one is XML Pull passer. This is our ex Emilio. The 2nd 1 is view Girl What is this? We will go. This is the period. What is the parent of this? This recycling used apparent. Okay. Do we want it to be a part of this review group? Yes, but is it attached to the root? What is the root that route? Is this contain Liam? Ok, we don't want it to be attached to the okay. So now will create of you are very simple which will take of us to date. It holds the view, right? So we'll put this view inside this and then we'll return. Viewers Why are pretending? Because there is no return type of this. And this fueled there. Now, this layer note guy, this little will be used for each item because they appear to w order and provided that we ordered toe this adapter. Okay, not this will be used for detecting. Next. There would be. See in this your lead constructor, What we need to do it defined the real types. What other field types in this garden view? Text two, right? What is this right? No title. What? Going simple, Right? This guy do you has to text Choose one is north title and not wanting idea. Okay, now we define it are due to find it not going. Tenders were still fine. So we need botella. And after that we're Is this north content? So he do this, not conduct? Why did I do this? I don't You don't find variety because this item view is this note Cut ce pas. This isn't two of you. All right, So this is our you older and we passed this. I tell you what is this view Northview between plated here. Okay, This is the note card, which is the view. And this is part of UAL And this is our view Told us we got diet Ambu now inside this north Well, you have the text wanting Similarly will have the Titan So we got that of friends to these These two, right? You want to write known? Create the order We told that after that this is the north to you Did you want to use in our piece Eichler view items right on this year Older is just sitting there is just defining the types of this period because the adopted should know right? What is the type of this? Because we'll be setting data here that is done in the bind You were there What will do it said that Did you? And in the good item going what we'll do is Goudeau put that did does size here. Okay, we'll see these in the next lecture for night. This is too much on uh you should just understand it and think of all day Think about the process It's simple We defined the view via defined the view holder here When you turned that we hold so that gets enough. You're that last, right? Andi, here. What we do this did. This constructor of your like constructor is being used here. So we just said that explode, thanks to your fields here. Okay, for now, I think this is it will do these two in the next lecture. Now I'll give your time to process all this. This is ready complicated for a new comment, but I think you'll get it with time. If you practise enough and read enough, you'll get it. And you have any questions regarding this? Really free to ask. I'll see in the next lecture. Okay. By 31. Showing Notes In App: and welcome back to the lecture. We're done in the last lecture, Waas. We had created this class while the view holder, and then we have created used this class. We were like last toe. Hold this note to be okay. What is the north view? This note card you can see here. Okay, tile Beautiful on the deck. Now what we're going to do is we're going to create a construct. Careful. This Okay, This constructor will take two arguments richer. First is a realist. Have a list of what it will take note and then it will take context. Why am a pass in context? Because context is very useful When you want to make some toast here. How do you want to lock something? Are you want to show something to use it, Toil. Just trying this dark north Dallas. So really, Riedel for context. So now we have created a constructor for our north adapter. It is constructed using home activity to create an instance off the adapter. So once we get done, what list from this constructor Julia was here. Okay, so let me just portrait ones. Yeah. So now you want Magda, are not that here. Just create a feeling. And then we'll say that after we're inside this because we want this north realist Toby. Favorite notes. Okay, once it is very late. Notes Well said really out here first. It right? No, it's enough. So there's no contact here. Will declare it go here. I'm going. Texted this. So we got the context regarding the list. Okay. Ones were. I did the Norden that list. Maybe it did a lot or not with this aerialist. Now, what we're going to do is you're going to state this adopted there to the recycling like a doctor. Okay. And now we'll finish this. Adopted. What is there this constructor regarding note. Let's see, you're passing it. And we got the context, bones. So now it will do Is set the data here. How do we do that, Steve? You are. What is the oil left? This is W world class. Okay, So does his buys. Is not buying your life as an argument, so we'll use tact. You were dark, dark? No. First title said text. Okay, go to the title. First C zero partition. Partition will be what agent starts room. Tzeitel here Okay. This publication is not things like that Recycler view position, OK, How How can you know? Make me show you die down. Yeah. See, every item is rendered. One lemon. Okay, but this party in the 1st 2 position off this item. Okay, so this is Eagle. This is one. Okay, so in the same level of this position, increments by self. So this body should we can use strict is an imperia. So we got the note list dot Get position so far in a little bit. So, any Shelly, you've been Z. All right, so we got word regarded in Chile. We got We are reacting. Zero The road north list. No. Okay, that did the 1st 1 So you got the 1st 1 and what we want from the first note we wonder. Died in Okay. The same thing would really do it. No Corning on. Get not. Okay. So we got that time telling the content. Now we need this. I am calm. Simple, right? How many items out there size off the list. So let me explain you once again, it's very simple. You might be thinking ho calls these methods on clear to you boiler and on buying your left night. This is called by the always these methods. Okay, I know Recycling adopted here. He said that up. That here, when she created that after we have defined these men right now, who calls these methods? The West calls these method because when you turned us the recycle of you, it will seawater After this. I didn't see that. What's a lot he said? Right? And what element has in this world? Okay, It's a these men that are guarding and get I am going to call, OK, to do that card one by one. Pastor Quincy on. Great. We would like to see that Lee out of that head up. But what is really out? This kind of the art division, okay. And then on my new or that always will sector data awful dine after. Okay? And then I don't ground. What we'll do is what That After what? That was the hardest us. How many items under? So did these many items. Are there too many north side there? These many items are there simple. Right now I think this is finished. Make me just books that support that goes to get on and idea what our favorite statement art is a fair statement to really just found it. Let's see. Oh, yeah, it's coming, right? The day does there on everything is there. But it's really about this, Mr. So we're going to fix this little just fixed ones. You just fix it with you can see what I'm doing on uh, if you want the court, it will be available. So, like, we just fix it, This is layout parts. I don't want to focus on this much, so you now you can see that our layout is finished. Run it again. Now don't show up nicely. Let's say for books, please. Chilling night. This is our title on this. Is that not wanted? You can see here I made some changes in the layout and now it's showing proper So you can match it with the date of Is this is the 1st 1 is this one? This is the title. Let's see. This is the bank right? And this north ritual chained up enough. So did that. And show this north and tell about fetching this Nord I made for myself. I'm showing this northern tell about pitching The data five is See? It's working. I think we have finished this section. We have learned a lot in this section. Andi, I know it is too much to process. But if you do it sometime, you definitely understand it on the do Repeat it. Do you repeat the previous lectures and everything? So it gets into your mind and it becomes familiar to you, right? This is it. For now, I think our section is done. So the next section would be Let me just right here. We have done this. Have done this. I had this from the next section. What we'll do is we'll see how to. I did these notes. Okay, so we'll see. How do I did these notes in the next section? So I tell you about it in the next section. How do we edited in the up and it'll show up in the database. So I'll see you in the next lecture. Do come back. And I don't come fresh because he's going to do new things. Okay. Thank you. 32. Creating Layout For Edit Notes: you come back in this section, what we'll do is we'll added the notes. We're already trying the North's and abs, and now we're going reading them. Let's see what other section objectives for this section. This will mainly be about everything that first the object that was too good and I did not lay off. Then we'll create another, not activity. That means it will create methods in this and then using doors methods we love date are I did the notes in fire waste your time date of is using fire with database mental. Okay, so we're going to do these three things and let's get started then. So fast. What I want to do is fast. I want to porta I didn't know, uh, but in here so that users can clip on that. And I did this north. So, like we just created. Okay, lets just user takes two and stood off Burton because that looks better. The Barton looks like a button on text to you. Looks very negative to it. So let's just use a text to one click off this text you will opened. I did not activity that will help the user to? I did not know. OK, so let me just played the stakes too quickly. So you after you did this? I did. I did text view that will help the user to know that when clicking on this you can just I did that. I did there. No. Okay, so let's just go to about, uh, adopter, why we're going good after. Because we previously had two extremes, right? 11 diet telling one north. Okay, that now year One more, which is called edit. So we need to tell that after, right? So we're defining out our takes to use here, right? So he just paid one more text to you. Do this and do this. So now that after knows that there's one more takes two, which is I didn't know. Okay. And what to do on Click off this? I did not. How will you tell? It really used on buying here. We said the data and know my thoughts fall This all this had so holy water. The holder. This is our inside this. What do we have? I didn't know. So just right dot Did not on a little ist sat down quickly. Okay, you. So what will we do? Will open. I did. No, David D. Yeah. Okay, so on Click off this really, really opened. I did not act So first, let's just create one blanket to definitive. No, go here, do it D empty. I did not. Simple, right. Took here. This You look just got a high lord here Just to know that our activity has something we just dropped this I love This is I didn't know, right? So we have this here. Okay, When we open, it will see this for now. I just kept it there temporarily. Now you just one letter, doctor, and launch that activity on click. OK, so lose intended. It is context. Eassey context is coming handy. We already pies to context in our notes and after constructed is the constructor. Okay, so we're using this I'm context context to launch this new activity. This is how you start in your to do it. New activity. It context this now it will launch back to a deal on takeoff. This I didn't know. So like we just found it and show you See now the the out has one more thing which is called aided. So when Mickley con decided we should go to the I did not do it. C This is I did not so dictated the basic part off it which is adding this I did it take to here so that users can click on it. And I did the notes. Okay, so in the next electoral, see how to really added the north in this I did not. Activity will create the layup and then inside the methods which will update the Norden Firebase. Okay, we'll see that in the next lecture. For now, this is It tells you in the next lecture. Thank you. 33. A Detour And Learning A New Way: So we'll come back up here now. What we're going to do is see, You can see area port yet I put that it takes to you here and on. Click off this. We're showing this. I did not activity, right? So logistical, Er but I did not. User can intel the new not And I did the previous Not so Let's just mentally out first. Let me go. You many more. This one. You need to feed everyone for title and one for the north. Okay, on one button to click on. So that I did will happen. Ok, I just created quickly. They are Layout is ready. I put two field here. One is too. So the title on one is to show the north. Okay. And on kickoff, this related the note. So to show them what? Here, let me just get that text Two years quickly on and then I get the button. Also editing. Do you regard these on now? Get the bucket right. So on Click off this button for doing so. You have to. I did. No, five is all right. What I did. No, I don't know. What is it to do here. Por died, ignored my idea. Simple, right? I thought so. I did the North. What we need is we need the ideal Denard, right? You want to tell that, uh, we want to tell Firebase Deck? I did the North ideas. Something something. Okay, So how do we get the idea, or did I d like this? This you can see this is the idea of the plus north. This is the idea of the second, or these are different. So if I want to read this north, I need this idea. Right. I want I have to tell the fire base that I want to update the north, which has this idea. Okay, if I want to update this north, okay? And if I want a break this note, I have to tell update north, which has this idea. I need that our friends to this more tight. So this idea gives media reference to this north. Okay. And then I can update our I did this note. So what I do is we don't have the i d. Now we have not saved it in a letter, not object. So what I'll do is create a I defeat on in our north object so we can save the idea. See, I could have easily told Lee our toe save the idea in the first lecture. It says we could have saved died inside here. I want more feel. We could've added it would be something like nor Diet e. And this decided he would be dead. All right, so I could have easily done there. We could have saved it with the not itself. I could. Levy is leading this and showed you how to say this idea could have saved viol creating the North. But what I wanted to show you that in the real world applications these nodes change every day. Like needing any new thing and coming right for example, today for us, this note I d came. And this is a new note for us, right? For tomorrow you you can have something as, like likes on this north, right? This can come. Okay. In this way, new new things can come here so we can just go ahead and update our application again and again with these things. By creating the north we kind us update this court again and again because the previous updates. See, two previous up. They didn't have this north idea. Now, if I put a note tidy here, this will crash. OK, the one way. But look at this because this doesn't have a no tied. So for this first, let me just move this. What ideas? There. But we haven't saved it here, so we don't have access to it. So if you want to get the north idea before without saving it to here, it's very easy. We go to our Nords to rewrite this nor data here and then we write, Exclude Or does this exclude the fire base? When it reads this class, it will excuse the North tidy. That means see Marks says it excluded from the five years. This means that when we fit to the data were aggravating the data in the home activity. When we fetch it here, this north class were passing to the snapshot. Right? There's north classy passing. So there's north glasses map. So the database right? How many fields? The database has two fields, not contented nor title. So there's no classes have doing that. And how many feels no class had to to feel right. No title and no contact Now a new free, less come up, which is not ideal. We don't want this to be length when we face the data, OK? Because Dad, not i d is not present in the database. So if we link link this also here, nor tidy so that will create some errors or it will create some bugs. OK, so we'll leave that out. So what we do is we exclude this nor diet because it is not present in the database. And we don't want firebase to think that this note does North will have a no tidy also. Okay, so we're not creating this date from the database. They always means this one. We're not fighting it from that Nord. Okay, this one. So we'll just excluded. And similarly with great getter and sector for this North I d and we will exclude these Get our insight are also how do we exclude we just writer annotation here. Right, so this is very simple way toe. Tell Firebase to exclude this feel. Don't map it with the database. Okay, so this nor tidy. Now we fetch it here. So this north north class when we assign it to does snap short here, it won't matter nor die de toda date of its OK, so now it knows that to exclude that more tidy. So how do inside the Nord i d now simply What we can do is our North is having the valley of the content and the title right title is there and not content is there now He said that Hi. How suicide like this. See this My third is available to us, but not to fire base. Okay, so the fire biz listeners country this matter and we don't want to read it because the North idea is not there and we don't want to set any North I d Okay, because it's not theirs. We concept it And if you give it here, it might cause some headaches. So we just excluded it. Now we're stating the North idea ourselves. How do we do that? He could go here. Snapshot keep what is this? Get key. Get gives the name for the source Location off this snap short. Okay, so this is the Keenan. What is the meaning? This is our key for this one. Okay. For the each Nord these Al duckies. These are our ideas, OK? He's and ideas are the same thing, right? So I know what idea said in this object, and then we're setting it here. So let me just printed ones. Let me show you how it comes. No, - See you now we can see what is the log your mind. So here you can see here. That what key ideas said 1st 1 is this right past one is this 2nd 1 is what 2nd 1 is Eve. I like hearing test. You can see second. So we guard that What I decide here. Okay. Inside the North Gaiety. And, uh So now we got the north tidy. Okay? And what I d is now inside this object, which is inside this list, Okay. And this list were passing through the north adapter. It's simple A for this list we have passed, and this north object is there. And this north object now has the i. D. So now what we'll see is we'll see how to do this. How to pass this nor tidy so that I'd ignored activity in the next lecture and use that idea in that it not activity. Do update the Norton Firebase. Okay, been see this in the next lecture, So come back refreshed and, uh, thank you for, like you, I'll tell you that. Next lecture by 34. Edit Notes Layout Finished: I will come back over to you. So we were just by a single. No one died here before passing that. I want toe. Say that most of you have told me that you are getting confused. What is this? How do we set the title and content here? So let me simplify it. Let me create a north object here, okay? And what is this? Not object. Good take from the north list. See, once it is starts from zero. So we got the north object, which it does, which is at zero population, right? And then we'll use does not object to get them no title and then no content. Okay, So initially. So I remove this comment. This makes no sense here. Okay, so we got the north from the north list using the index disposition starts from zero first tell you the 1st 1 then the second month and for the each year setting that no title you're looking and no contact. Now, if pas these so the addict not activity, right? And it's it should be finding because it is excess pro man in that class. Now we just duplicated. So I hope you're getting what we're doing is passing the north. I tell going in the north. I d do that. I did text that I did not take too. Now what will do is located some string here and I don't No and not Heidi make this 80. He's already takes family, Making them et okay. I didn't You did to their name Na VI got back. Now what we'll do is we'll get that extract Vitry ST from here. Okay, so when does activity open? To check if there are any express so that extracts are not cardinal, we'll try to them on save it. And these strings, right? Save it. Didn't these strings Okay, So what do you do? Is well right here. Get intent, not get string extra. What is the name of death? The north. See the name of dextrous nor titles with the same here. Same goes for not going painting more tidy. Why we're getting these? Because we will said this in the well said the by telling content in our layoff head here will hear well said that No title, you know content because you should know that What waas What is what? What is what is it that they are ready thing? OK, so they should know that. So you're setting it. So now in decided in their normal Yes, I did hear it. No vitality not said text? No, thank you. Same goes for content. No. One more. Okay, Now you just run it and see if these title and gondron coming If you click on it on any of the notes, See? Now read it here and see these title in content is coming there. Okay, so it is coming, OK, 48 north. It will be different. Let's time from this one. Yeah, for this coming late. So now if I'm loser, I know that I'm dating this. No. Okay. And I'll just eric it like this. I'll just write something like here. So if I'm they use that here. So I know that I'm living this north, OK? I'll just put something here. Something else here And what I'll do is I'll click on it. It not Then it will get updated. No database. Okay, now we have shown the user that what is it that they are editing? So, on the next lecture you gave the function toe this I did not button. So the data will really get updated in the fire is Okay, So I'll see you in the next lecture. Every finished decided. Norden. That next lecture. Okay. Thank you. 35. Edit Notes Activity Finished With A Bug (Yes! A UI bug): American medallion in the last lecture. What we did is we have got the no title and no content. And what i d from the previous activity You successfully saved this North I d And now we're going to use it. Two. I did not. Okay, here we have written that I didn't know what was idea something. Now we have got that. So we'll use this. Whose ideas? Nor died. So whenever, like me explain again whenever there user clicks on this. Okay, I did for this one. If he clicks, then we will use the idea. This note. And what did the idea of this first North? Let's see, This am something. It's Ah, big string on and it's a I default this. No. Okay, so we'll use this idea for this one. And for the 2nd 1 Really used. Decided. Ok, you can see it is very important because we need the access to these. Okay, We can destroyed north slash north content because then firebase won't know which noted it has to update because both have no contract. Right? So we need to tell it which nor to update. How do we do that? Using this idea. Okay, so now what we do is in this addict North Fire Base. Northern Fire Base. Real. Right. The Mattek toe data not. So. How do we do that? Do you get that? Friends? So this is the road reference, right? They made some stick. Let me get that. This is the rule preference, right? We've got the database now. We got the route with friends, Okay? No. What is the next step? You think about it. While I did, I did try to get it, Actually, Don't guess. Just think about it. So what is the next thing we want? Route references? This We got the reference to this. Now we really want to go inside this user. Okay? And inside this users why were we want to go? You this user, I d want to go inside this huge variety. And then inside this, we want to go to the north and inside that we want to go to the north back. That is open. Currently. Okay, which one is open? Let's say real open this one first. Okay, So what is the idea of this one is not This is the idea, like, so we'll use decided. How do you do that? You already have saved I d here in the home activity. So you already side the North died in the North project and we have already pies did not object to the doctor. So through that adopter, what we did to us pies that I d to the next activity. So we are just passing that a different one due to do another. So in that I did not I never let it Nordisk cute. The idea of that particular north is passed through the I did not activity. Okay, so we got We have the i d. Here in the area, not activity. You got it right? You can see it. I'm just a greeting. The previous lecture just told just so that you remember it. Okay, so we got done. North reference. What is the North preference? It's naming north defense. Go artistic preference. Your child or the child users. Now what do we need? I guarantee you the idea and for that, or do we need in a tingle bartering? Yes. And you don't use it by using Let's name him got into. Okay, so that's name it carrying. Okay, so Now we get the car into user. I d Now we go to the which No, we want to go see inside. Use us inside this user. I d No. What you want? Write notes You got done. What's reference now? What is the reference? Who? Our particular No, no. This is now particular North Nevins. I'm just giving it this kind of name because I don't want to to be confused with distant waters. Okay, North reference dot Child. What is the child here? No, I d right. It has to Child's notes as to child. One is this one And this one, Like I knew this one. Okay, so we were editing this. Not Okay. So we will use this idea and we have already passed tidy here. Regard the idea of this past one. Okay, ideas. There's We got the difference. Now we want to say that I tell in content board. Okay. Just to board. So where the child we want to update first the north content. So it is that I love this idea. Right? Well right dot child North. I tell us talking then we like the country because title comes first. What is the value that we wanted to say. It's simple. We get the value of this addict text where I desired text. Let me show you. I see we get double early or thes direct X took it tighter and then contended Then we will update Uganda Valley of this Do we do that title No title deed or get take stock and similarly will get picked for With child not content Here we can Arda we can add a complete list Now on. Right So what do we do that dot on completely new one complete. See this on complete listener gives us the same thing which we used in the No indication also this task objected gives and we can check if it is successful or not Else what holiday ? At its statement I should have made a closet just to bring this editor statement were writing and again and again somebody that a guard. Okay, so many successful But what do we want to show? They use that And what updated Texas when he right So what do you want to show the real short toast first? Okay. No, they did success fully and I just think successfully right Billings correct. Everything is correct. So I guess. Or do we do now? You just took it. Midanek running now. See if it gets Uh Okay, So the section lorded How oddly Cyclery, Lord! And now each and that detects. Let's see what we do here. Well, right here. This is it an idea? I did it. I think you're right. North is also And they did. God had ignored what? Updated successfully updated success with the content. So you can see enough. The content is updated successfully and the title is are subjected successfully. Now, before I do that homepage and see if it does have looted there, see what is happening here? This new editor is coming. What is this wiser to help me? Because via stating that after here they So once this is I told you that this is called this is called many times. Like whenever there's a alluring change. OK, so now what we did was we change it twice. Okay? How do we change twice Because once trained for content and then it rained for title. Okay, so this part over home activity of it is read north that all terrain place right twice. And then the initial one was all already there, so it became ties. Okay, we'll see. Six Nazi, right? Other one. Is it in here? So that is a But here. How do we solve this? But so you think about it on, uh, we have finished. Died, ignored activity. I allude answered in the next lecture. This is just an assignment for you. How do we solve this? But you just explain it again. How is it happening? This were living. Listener is attached to the north reference. What is this more reference here and that value Lee event listener. It's triggered every time there's a change in these. Okay, if there's an order I read all if there's something I read in the Contender title of these notes Okay, so if we do that, then every time it will fit start date up again. So because it want updated data. Okay, this value in listener is triggered. See, each time the data changes so it gets updated again and again, and every time it gets updated every time, does this adapter research again and again? So that means my people items would show up here right So that is a lot. What? A bug you can see because it didn't crash a lot. That so I want you to think I do. It's always took it in. The next lecture will see how to solve it From now. I think you have to stay with this question and tried to figure out the solution. I'll tell you dancing next lecture. Thank you. 36. Fixing The UI Bug And Learning About Debugging: Well, you can make out even welcome to our buggy F in the last lecture. What we saw his hollowed up has no. Ah, Bug. Okay, so why's this book coming? See it kindly, Because off this adopter, right? Because there's a rapturous stating only ones. Right? But whenever the value in listening this card is that after setting again, But that should be friends down after, right? It'll all right? These and she was only two, right? But it is showing us multiple items. How is it showing us multiple items? It isn't because of this I realist. Because you can see that a new North is I did every time. This new allure, this value and listener is card, right? So every time this value U aimlessness triggered a new north decided to this list and how many notes that I did it once in the for loop, you can see trends toe to times because there's only two Children for this north sap. Okay? No, it's not right. You can see others only to Children. So this value in listener is triggered ones. And then two Children at one time already toe this are released. Okay, so every time this are living listener will get to get to Children will get added to this list I so thes two Children are then Benedicto this a realist, right? So every time the size of the realist increases. So every time this north end up terrorists the northern released has I need increased size , Right? So that's why these new new items are coming Here, Let me show you what I mean Let's just bring this a realist I will bring it Create Ah, new Materia Bring the no list I want to show you the items off this north list Let me show them So for each past list here I had a list of North No for each Norden. No, that list do it. Balog Logging is just debugging. So I'm telling you are true debug Yeah, this is very helpful. When you want to devalue, will you be reject? That is, logging is ideal for looking. So you should also try this. What does this logging do? If your family a bit and red you would already know that, but even are Let me tell you this foreign Xda by losing the locket so it just diapered here . Nordle. Brenda. A realist deposit. Now it'll Brenda a realist. And show us it was double Lucinda in the locket Here will show. Okay, elect me. Does chronic. Now we'll see the values ones that did running. So I'm teaching you how to debug the Okay, This is very there. No course teaches this. I want you to pieces because this is very helpful if you run into your own errors. So we had here in that. Now what will do is you might be wondering why they were showing one big toe items when we opened this half. Because when we land up again, the well, you and listener is called only once. Okay? Previously we had already learned up and it was called twice. So now let's see how many elements gets addicted. The North's north list When we arrived, let's not see. We'll see. We'll put our tag here. My note So you can see this Waas 16 32. Right? So you have this one's of this twice again and then tries. See the leering listening triggered again and again Why the trigger again and again once for this one. For this I notice printing here. What is it? Printing? It is getting added to this north list. Right? So every time this were living listener squired New north heretic toe this list and our list size increases. That's why we see these many items. So what do we do? How do you fix it? We just right here that every time this leerink listening started, we'll just clear the previous list. How do we do that? Just write. Clear. Okay, now if we learn it, let's see Then I will see only white on because now, in mid on it it is called only once. But when we're did it, it will be called again. Right? So well edited now. Okay, well aerated related to something else, Rick Tighter. Is it here? New North is more. Did also ready to click on this It is called price but now we see decked. What list off north says only two items. Why? Because we're clearing it every time this value in listeners triggered it is triggered tries you can see here Why is it triggered flies? Ones? But this month But this one's called this whole Okay, It is a good price and we're clearing the north. So now we have only two items. How do you get that tow items? Because once it was triggered, this too might have come right. So we clear the north again once it was again triggered. So we again clear the note. And now for the tired one. When we clear it, we are Did this on now the north side A list has only two items. Just coming this now we don't need it. So I hope you understood. We're just clearing the list before reading the items because it was causing the list to increase in size. Why? The list was increasing in size because north separated. Why these notes Where I did because the alluring listeners call again and again every time they're not changes. Right? So every time we had a great it is it is coming again and again here. Okay, so that's IVF leading the list before heading a new nor twit because we don't want up previous notes to come. Okay, Okay. Toe This is it for debugging this. I know what I didn't know. What is working fine. Now in the next lecture or will see is how to delete this. The lead this north. Okay, so we'll see that in the next lecture. For now, I think we're done with this done with this, and we're done with this. We also learned about debugging. Okay, bugging. So you're done with dark. Okay, so I'll see you in the next lecture. We learned about how good the lead. So do come back in the next lecture. That really finishing on WhatsApp and that will finish the course. Okay, so I'll see you in the next lecture. Thank you. 37. Creating Delete Notes Layout And Activity: Hello. And welcome back in this lecture. What we're going to do is we're going to create a delete, no text to you here, and then we're going to believe this north in the fire base state of Okay, so let's see, the section object is first, we create our delete, no text to you. We'll also create a delete known mattered in home activity. Then we'll delete the north in the fire base on. Then we'll create a lead. No dialogue to show before the leading the No. Okay. By issuing this because you should know, right, uh, we should give them. Ah, John's too not deleted if they don't want to do it. This is best practice. So let's start with this treated lead. North text to York. This is our card view, which is on north car. So now you can see advertised Just a dick button. Okay. Now you create that. That's do it will say delete. Right. So let me just created quickly. All right, so now you can see there's a delete button here ritual which will show up in our, uh, water a north feed. Okay, we're the north side showing. Let me show you how it looks. We'll run it. We'll see it. No. So why little burning? Let me tell you. I will do it on the click off the delete button. What we'll do is will delete the north in the fire base. First we have to acknowledge his Burton were in the notes. A doctor. Okay, so we'll just create up their friends to this in the Lord's Adapter. For now, there is no difference. See that lead? Burton is here. Now on. Click off this. Now nothing is happening. Right? So now really make it click ever. How do we do that? We get the difference here, Cedars. There did not No delete notes. The lead, not simsim Little thing between did in the I did not. Okay, our doctor, I did not delete. Right. So now we have to give this lead motor function. Now it is in our view and will use it in our adapter. Okay, Now will just put on that idea just like we did folder. I didn't know. Okay, So before the leading what we're going to show we're going to show up dialogue, So let me just creator dialogue first. Sure, believed. You know what? Dialing like simple stuff. They created this dialogue before we Do you remember? Yeah, it isn't that. Log out, log out section We have created a similar. We will create one here, like, created quickly Because you have done this before. So here I have created and I love which we last the user. See, You can see here. It has a message here. Here, you can see the message. What did you say that? Are you sure you want to delete the dialogue? And then the site positive button will say yes and then negative. But I say no. So he doesn't want to lead the not Then you'll click on. No, on the dialogue will dismiss. Nothing will happen there. And if he clicks the US that I want to deliver, you know, so we'll just leave the north here. Okay, so how do we do that? See an adapter. We can't began Porta Met idea because it's not good practice to put on the 30 year. Most of them attack should be in the home activity. If you want to change the database, we have to put the matter in the whole activity like. So take me just right here. Home activity and real Castaic toe context. So now we got their friends toward this home activity. Okay, hang how weaken Gollum. 1/3 in this home activity? Or do we do that? I'll show you in that next lecture. How good Boo does. Okay, because this is something on clicks on and most of whom might not be familiar with it. I want to explain it while others are lowered in the next lecture. So for now we have created a dialogue on the legs like that Will really don't know. OK, I'll see you in the next lecture. Thank you. 38. Deleting The Notes In Firebase And Asking The User Before Deleting: though. And we'll come back out here in the last victory of creative dialogue. And we created a no text which will show that island one click. Right, So on Click off. Yes. On this dialogue, we need toe delete That not right What I told you before Waas Doctor, the matter to believe the North will be in the the whole Mac do it tonight. So what we're going to do is create a meth idea. How do we do that? Just I wrote this. See? Here you can see Elect, We got that. A French toe, this home activity. How did you got it? Because because take this home activity to our context. Right? And I knew it. This context is a part off home activity, right? We're passing it from the home activity. Seriously Think that after the break we're passing the context. So we have to go cast this home activity to the context. So now we've got the defense toad activity. So this you can understand This is something like home activity dot Delete? No, from by OK 13 guys to this context. Okay. Once you got past home activity to this context, then this whole bracket becomes this home activity difference, right? So now what we're going to do is create a nor its creator, Matt Idea. I will release Return the name of the mountain that hold back to it. You don't delete north from five. So we just created press all placing that you'll get up, die love your that create deleting on my turning home activity. So we just do that? Yeah, I'm a tally skating now. I'll tell you how toe believe the northern fire is okay for to delete the Northern Firebase . We need the things that we use in the reading off site. What did we use according to use that we used? Right and the fire with database reference we need We need the North reference also. And then we need that. Then in this deal, Eagle in when you double on more weapons, what is the one more reference? Let's see. See, we have year. Do not right. This is the route. Not then inside this users we get the reference to that inside this we need the current use riding right, So we'll go until here, then we need the North's Nord right and inside this. What we need is the North I d toe delete that particular note. If I click on delete for this morning, then I need decided. Firebase must be told right like this North er to delete. How do is say that which No, to delete the pasta nor tiny. Right. So it's him. But I tell you how to do it first. We just need the difference is like this. Okay, I'm going to copy it just to save time. So we got done order. Right. So we're out of me now. B are here. Okay, we got the notes and still here we got. Now we need that idea. How do we do that? We need the idea. What decided? The north side. So Well right here. Okay. No. Okay, So this note idea is to be positive, believe, nor Trump IV's nonviable door a doctor and passed back north title. How do we do that? Here North? Uh, first deposit in the dialogue. Okay, So this so the north idea will come here, then we'll pass it here, for example. Well, I know dot Get one. So we're past this modality to wear this Delete. No, dialogue matter. So now we'll do. Had stingers first moved plus better me. So now this note ideas being passed to our matter Now what we'll do is we'll pause this nor tidy here or delete from fire base. Simple like so Now we believe not from fire basement or does the north tight. So we want that friends. So this. Now what do we do? That more weapons? Dark change? What is I d nor type? Simple, right? Why did I name in particular? Not because we wanted the idea of this reference to this particle in whatever you want to delete. Okay, We go through the I d and then delete it. Delete method. Okay. What is the delete matter? It's ready. Symbol firebase. See the beauty of fire basis. The methods are very simple toe, remember, and to implement late. It's mostly just one line off quarter two lines. So to delete this north or do we do he gets the North offense and then we pressed dot See, we're getting that medical This What is this? Removed value? Simple. Like this will see. You can see that this is the method Ritual said double your dislocation to know. So once you set any location, Tony Allen, five ways It deletes. Okay, It becomes it becomes obsolete on fire with just delete Stagno. Okay, if I said this to know, so this will be no right. This whole will be Now that means six nor no longer requires a firebase A little It'd automatically. So there's no way to delete anything in fire is okay. But be careful how you use it. Because it's very parliament on. You can't restore it. So, like the loving are we landing to such as deal. You get something that we didn't want to delete than we have to contact the fire with support for that, and they restored it. But they told us to be cautious and using this remove and you. Okay, so they be very cautious with it. That's why I did dialogue here first, because this is the best practice to dough on the seltzer's in protecting the data, right? So that so That's how you put it here. So let me just go back to a lot of, uh, my idea. Okay. So now you're removing a value. Well, we will be removed. Then we'll put up one completely new ideas. Simple. This on complete listener were putting it again and again by because we want to show some feedback to the user that if the task is successful, simple We have done it many times in many ways. Okay, Now you must be familiar with this is successful. What will do? The North is deleted and fire based on what is deleted. Success. Really? Right. And if it is not successful, our favorite better message. So matter of card. Okay, so this will tell you. Noticed. Saluted successfully or not. Okay, so I think this should the leader board in the fire base that seafood walks. Okay, Just keep these open. David walks they made on it. Seen elder app is running. We after delete their north here. Okay, So what we'll do is just delete the north. David Brooks. Are you sure you want to delete it? First less present. Okay. No, nothing will happen now. We'll press. Yes. So impressed. Yes. Okay. Let me do it. I didn't place hiss like we do it for this note. I want to delete the top one. Yes, I did. Press. See, it's gone on north is diluted. Successful. Okay, so it's gone from here also, I now some more than once. Elect me just right here. Last section Delete. No. Okay, this New York, it is mine. Deal, I I believe not on your is there like so the North is coming here. Onda, Uh, our creating what is done This I had it because I wanted to show you lies that you can use this app now. And it is a usable up it is. Ah, almost a real life. You have to make a few tweaks like you have to create a better layout on, uh, everything else is done. I think so. Let's see that. What? We have finished here. We have finished that delete note we have really deleted. And what we have edited. Don't know. OK, so the new North has come here, right? We located a noon want here and the welcome messages that we have already faced the name off the user. Right? So these are the basic and most important things on. These are almost two used in every project which is used, which is created using fire base on, uh, just right here, done here because we have just finished all of this, right? It was simple light, the leading on order. Very simple. Five bits. So that is the beauty of five is with minimal cord. You can do many things and it's all real time. When you delete this, you can see that it gets updated really fast. Right on. The response time is very good on. We have done most of the basic things we have done all the tried operation create update and delete. So this is all the basic things and this is what is required in real life projects. Also, this is not just an introduction. This is used for creating complex relapse. Same operations are used on. Maybe they're used my people times, but the basically means the same. So what I want you to do is just practice all this again and again on and create the off, create this up on yourself and release it in play store. Right? Because if we create after, we need the people to use it. So just release it in the play store. With all this function, it is whatever we have learned, you don't even need to add anything here. most of the things are done here. So you just create this north up and release it in the fire. Based on been Sheraton, your social media, LinkedIn, whatever you want on, uh, let's see how it looks and you can die to us about it on the futility. Zab, do let us know through our social media, we just see how well did on how your projects come out to be you. And if you don't release it, just what a radio or put a description out, put something to show the world that you have learned that such complex things and you can now create a real life applications. Okay, without any server on its very quick to make and let your creativity floor you can create other wraps like this is the North's up. You can also create Ah, the friend off Like you can create a weather app. You can create our mind that up you can create many kinds off, put the video or put up get doubling couple whatever you want. Just hear it with oil and you can see our social me dealings on our profile. You can the staggers there on so we'll see the projects and will also connect on different Social Media's. There's to see how you but formed and how you created your own projects. Don't decide to share because a demon starts with something basic. So you can create a basic app. Or you can just show this same up on, uh, makes family out changes. So this course I think it's finished. Now we have done many things. Okay, gave landing on, uh, we'll see you in the next course. Thank you. 39. Connecting User Account Activity To Our App Flow And Finishing It Up~!: Hello. Doing this? Lecture it just to finish out up on duh. Create a good flow for the user. CVS created this user account activity on duh to show it. You know what app? What? We need to do it. We create a menu here, right and on. Click off this menu. The user can manage their account. Okay, so this is just any easy step. It is a standard android way off creating said things for the user. So how do we do that is we just create a menu first. Okay. So really go here. And the values sorry in the resource is and will create a four love last with cleared one. So this is our menu for and in this man youthful. It'll create a menu. What? When this menu have this will have the user account activity in love You can log are easily Now we have created it like me at some items here. I'll explain once I'm finished lighting. Make me just like this. So I've created two items here. One item is for my need account. You can see which will open the user contact Pretty and another is love ok, but these men, you will now show up here. Okay? And we're on the up again. So, like, we just connect these menus to their functions. Okay, How do we do that? We go to the home activity and right here. Options menu. Well, just creator one creator options. When you and here I light something Do inflate Armand. Okay, So now ever signed them and you toe a little? You are like, do it. Okay, I know. I just get item. See, this method will be called on NYTimes Selected. What I'll do is I'll create a switch case here. I don't not get I don't I d. So every time on item is selected from our menu, this such case will belong together. What? I did this on. Click off this user account menu item will open the user account activity, log out just love out the user and opened a logging activity. So let's see how it blocks Midanek. It is easy. I see. Now you can see her man Newsier right. Our notes are coming. This is, however manage account and this is love Overtook it. The ones Let's seal manage account is working on north. See everything year updating Mylan object password. Right. And yet the longer it also you, if you log out, it will be locked out. Okay, let me show you some Leo changes that I made. Let me show you that. Create north. I've created this. Ah, takes two year year this welcome to extend everything so that it looks more appealing. Right? So this is what I wanted to teach you use That should have some feedback, right? What are they doing here? So you can just encourages them and write these messages. This makes that more user friendly. Okay, so this looks more appealing right before it was just blank. So you can also read these titles, right? Remember, user experience is most important. Okay, So you can also these are now what we'll do is well, just logo. See, map is finished now. We have created a greater we went from Hello, Er toe this whole notes up. I hope you enjoyed this. Court's on DA. I hope you like it. And if you have any questions, you can ask in our Q and a section we'll always aren't started. Thank you for watching Andi keep learning