Or you can specify the application name.
He had also.
So for example I can say firebase database instance.
So not just that I actually offered to this firebase database instance not this database reference this
database reference here now is referring to these computers category but now I want to actually create
another child for our database instance.
So if I show you the database now as you can see we have this instance right.
So here I can say firebase database instance.
Now I am into this instance right.
So firebase database instance thought good reference.
And here inside the double code I can specify the reference.
So here I can say application underline name.
Right.
So this is going to be the key that set that set value.
Now I can specify the value here instead of double quotes.
I can't say computers
data and then I can put a semicolon at the end of my statement.
So now let's run our project and see what happens.
Now let me show you the web browser and the emulator.
So now as you can see here it's going to actually create a new key here and a new value.
So here as you can see we have these key application name and we have this value computerless data right.
So if we actually go to the Android studio here now you can see that we actually specified a reference
to this firebase database instance.
So application name is the actually is the key and the value is computer's data.
So now we want to actually get this data from the server.
Right.
So let's see how we can do that.
So you already know how to do this here.
You can't just create an add value listener here for this key.
So here I can say for your base database instance that get the reference.
So I want to actually create a listener OK and add at a value listener here for this key application
name.
So now let me show you the web browser as you can see we have this key here right.
So now then I want to actually create a listener and add value listener here as you can see here we
can actually get this data.
We can be actually not notified when this data is actually changed.
So let's see first we need to specify the key.
So now managed to copy this value here and now I can paste it here right.
And here I can say that add value event listener.
And here let's actually just type in here new.
Right.
So now after this Apprentice's here let's actually create a new line so that you can see these values
here.
So firebase database instance that gets reference this value.
So here we are referring to this key dot add value event listener and inside Apprentice's new and just
hold the shift key on your keyboard and then press on the leader key on your keyboard.
And now the autocomplete feature of the Android studio is going to help you to choose this option value
event listener and then press enter on your keyboard.
So now you can see here these lines of code here are actually put here automatically by Android studio.
So now at the end of this parenthesis we just need to put a semicolon.
Right.
And now inside is an data change method.
We can easily get the value of this key here as you can see we have this argument right.
Data snapshot.
So this data snapshot argument actually holds the value of this key application.
Right.
We are creating this add value event listener on this key.
Right.
So now this data snapshot actually holds the value of Diski and now I can actually just get that value
here.
So here I can create a string variable.
And here I can say string value or string application name application name assignment operator data
snapshot.
That gets value.
Semi-colon and then in the inside Apprentice's I need to specify the date or type String class.
So here now we've got this value application name.
So now let me show you the emulator here.
As you can see at the top insert this toolbar we have the name of this application app 64.
Right.
But now I want to get the name of the application from the server as you can see here we have this key
right.
Now let me show you the web browser as you can see.
We have this key inside the inside our firebase database and disvalue.
Now I want to change the value of these toolbar as you can see here.
I want to change the value of the application here.
Application Name to this value computer's data.
So in order to do that you can actually just say get support action bar.
So this method gets support action but it's going to actually give us this toolbar here.
Right.
And here I can say that said title get support action by that said title as you can see here this value
of 64 is the title of this action bar here right.
So get support action.
But that said titel application.
So now we are getting the application name from the server.
As you can see here computers later on we are putting that value on the title of this action.
So now let's run our project and now let me show you the web browser and the emulator and here as you
can see the value here the title of this action board is computers they tell you you are getting this
value from the server.
This means that if you actually change this value to another value for example computers and if I press
and enter on my keyboard now this value is also changed.
Computers right.
So hopefully that makes sense.
So let's actually change this value to computers data computers database and the person on your keyboard.
And now you can see this while your computer's database.
Right.
So let's go back to android studio.
And now after this listener after the add value event listener for this application name as you can
see here now inside these uncreate Meffert right.
I am inside these uncreate Meffert.
So now I want to create a listener for this Potin as you can see here.
Right.
So here I can say between sent or update data.
Right.
That said unclick listener new view that unclick listener right.
And now you are Enceladus uncle method.
So first of all I'm going to pace some lines of code here inside the unclick effort here and then I'm
going to explain to you what's going on here.
So as you can see here these are the lines of code that I pasted here.
So look at this line of code here in line number 92.
We have actually a variable of type string and the name of this variable is computer name.
And then I put an assignment operator here and then I refer to this editor EDT computer name.
Right.
So now let me show you the emulator.
So this is actually the EDT computer name that takes that to a stranger.
And then here we are assigning this value to this computer nobody.
So this means that you are actually getting the text value of this as it takes.
And we are converting it to our string value and then we are assigning that as string value to this
computer named string variable.
Right.
And again in line number 93 if you have another string variable and the name of this value event is
computer power assignment operator.
EDT computer power.
So this idiotic computer power refers to this as the text.
Right.
It is the computer power that get text that restraint.
And here we are assigning that string value to this computer power line number 44.
Number 94.
We have another string variable and the name of this variable is computer speed assignment operator.
EDT computer speed that get text that too strange.
So EDT computer speed.
Is this value right.
We are getting the value of this he takes the computer's speed and then we are actually converting that
value to us think value.
And here we are assigning that value to this computer speed value.
So here we are doing the same thing to this computer run valuable.
So here we have a variable of type streambed computer ramp assignment operator.
It is the computer RAM.
So this is the computer Romley First it takes that gettext that restraint.
And here we are assigning that value to this computer I'm in line number 96 as you can see here we have
another variable which is of type string and the name is computer screen assignment operator.
It is the computer screen.
So as you can see this value is referring to this edit text editing computer screen that get it that
get text that to history.
So here it is actually assigning that string value to this computer screen up valuable an inline number
97.
We have another rowdier bill and again the data type of this variable is strange.
Assignment operator it is the computer keyboard.
So here we are referring to this actually this eddy takes it into a computer keyboard.
And now that good text that too is strange.
Right.
So here you are assigning this string value to a computer keyboard string variable and in line number
98.
We have another variable and the name of this value event is our computer CPQ assignment operator EDT
computer Sibiu So this computer security is referring to this as it takes.
Right.
EDT computer Sibiu that get text that restraint and we are assigning the value of this string value
as you can see here the value of the EDT computer APCP you to this computer Sibiu body.
So now I'm going to pasting some more lines of code here inside this uncle some of it and then I'm going
to explain to you what's going on here.