hello everyone welcome back to this tutorial base application this is tutorial number five of our android firebase video we are uploading into our real-time with the database and saving it also into our storage is what we have done in the last video guys so now in this video guys what we are going to do is to let me just head over to my UI and as you can see here, let's go to my emulator and I like to see if we have as you can see here we cannot see the image that we are trying to insert to our firebase DB, but okay so you don't have this if I try to okay we will just leave it like that sorry so now I will just what we're going to do so we are going to also to let the user input the following field and then keep the value from this edit text field and later on, when you click me we will also uh put it into our real-time database so see how we can do that in our class so as you can see here we will be uh one image uh variable yeah uh
so how can we do that so we need to uh first we need to initialize this one I think we organize those elements so we have email and plus so okay up to here is successful when the button is clicked okay when the button is clicked source click we need to create a method that will also handle the following fields right here so but you can even move this one I will just cut this guy to make it a little bit cleaner a little screw and cut and I will create a network here I would void upon submitting the form submission for this person here I will pay schools, here activity input first a little bit here its password we are just assigning the value on the edit text and put in this variable as three and then here is install this variable local variable after that we can check each of these can check simple as that gets in here actually there is a much more efficient way to do this but I will just show you some other method of cheating you can see uh it feels important you can just write in that's it there are messages email this required required
okay we can add additional cheats here and we have a method address input right we are just using a message if the value of this it's not the same, uh we don't allow the input statistics password is not required to get confirmed password is not equal to the value of this two string is not the same then we will throw an error confirm set error message password okay once we were already done checking all of these fields and then otherwise to insert this data we have fixed user extreme text okay we are going to insert that data but we need to create the model for this object so after that, we are going to show the dialogue below okay so here we need to create a model or first reference of the database and then we are going to insert this so first we need to create a model for this one I will just create a model for this
one data page password and that Clickbank password it shows an error right now because we have not defined the module object yet but we are now I will go here and define this stream you can name it however you like just okay I'll just use your name email uh password then we are going to implement the first signal create a constructor so I'll just generate instructor with sure now we have an error into our that you can just pass now for the image for now and then what we are going to do we need to tell the value but I will use this one guy so just to the account and let us try to run this one to see if this will work into the button, we are going to submit okay we submit we now let us try if we have done it correctly or otherwise it will just give us an error but we will fix it throwing an error add an image so but example if you have an image I use this one and then I'll submit it so it will set me the image so
now let us try to use it later on but let us try to type here if you can make the input I will just put a not much password and let us try to see if you can get an error password this one is still appearing so we fix it, later on, we have I think it was recorded I will just password this time underneath because we did not select an image okay let's go and try to restart it but I will just go to we have two images here now let's select an image for this type I will go and type the password and let us match it so you can see if here we will be successful reset this form and still we are getting an error that we are going to fix in the next video guys so I will try to reload if it is submitted or not we have a database but then you need to check here is still telling us what is I think this is what we are going to fix in this video so let's take this particular it's the reference for this since we already initialized the storage we are getting the entrance of the storage here we are getting the instance to quantity this storage and put them into the variable
studies and instead of using it okay just the password and just apply the video database exceptions to
now let's go and try to change we go okay we need to generate later on here no properties to serialize up
why is again, forgot to sign it let's go back to our database and you can see there is a new hashtag you click open you can see we have teammates and we have the password in the email address and that is how you are going to insert the data into this real-time database guys, so I hope you learned some of this in my video tutorial guys if you enjoyed watching and if you do please consider uh hitting the like button right to my channel if you have some questions and doubts or comments you can write in the comment box so the thing I forget uh is to sit when we are inserting the data so after we insert the data
we can actually uh sit click but the all of the build so we can after we insert the data it will be successful to user set x screen and this will remove all the input from the uh the texture you can first fix it and also
so you can even run it again to check, so as you can see how the little bit long time of recording I think I need to uh separate them or to split the video so in that way this video because this is a little a bit so I think uh I will do some editing stuff I will just little just uh shorten the length time of the recordings here we will not get lost from it so let me just uh input again other pictures I will just go and type then
so we can type the same password okay submit now if I am too as you can see all right now it is empty
all of the input is constantly and you can see here we have successfully inserted data into the database that's all you need to know within this video guys so I hope you hear this video and I hope to see you in my next video guys so in the next video guys we are going to uh learn how we can retrieve this data so it's a real-time database and our three bits put it back into our application UI here we are going to use safe recycle recycler view which you okay so you guys hope to see in the next video and thanks for watching please be sure to subscribe hit the like button if you have some questions drop it in the comment box and see you again bye. In this video, we are going to learn how we can insert user data into Firebase Realtime plus we will also add a function that will allow users to upload an image to Firebase Storage, so we will have a better understanding here of how we can Integrate it to our android app. Get up to date with the latest video upload by turning on the notification bell icon from this channel.
0 Comments