1
00:00:00,380 --> 00:00:03,360
Or you can specify the application name.

2
00:00:03,360 --> 00:00:04,350
He had also.

3
00:00:04,470 --> 00:00:08,280
So for example I can say firebase database instance.

4
00:00:08,310 --> 00:00:13,820
So not just that I actually offered to this firebase database instance not this database reference this

5
00:00:13,830 --> 00:00:19,440
database reference here now is referring to these computers category but now I want to actually create

6
00:00:19,650 --> 00:00:22,750
another child for our database instance.

7
00:00:22,890 --> 00:00:27,190
So if I show you the database now as you can see we have this instance right.

8
00:00:27,210 --> 00:00:29,830
So here I can say firebase database instance.

9
00:00:29,970 --> 00:00:31,990
Now I am into this instance right.

10
00:00:32,250 --> 00:00:37,480
So firebase database instance thought good reference.

11
00:00:38,010 --> 00:00:41,340
And here inside the double code I can specify the reference.

12
00:00:41,340 --> 00:00:48,230
So here I can say application underline name.

13
00:00:48,540 --> 00:00:49,080
Right.

14
00:00:49,140 --> 00:00:56,210
So this is going to be the key that set that set value.

15
00:00:56,360 --> 00:00:59,400
Now I can specify the value here instead of double quotes.

16
00:00:59,400 --> 00:01:01,980
I can't say computers

17
00:01:04,260 --> 00:01:08,540
data and then I can put a semicolon at the end of my statement.

18
00:01:08,550 --> 00:01:12,290
So now let's run our project and see what happens.

19
00:01:12,300 --> 00:01:16,670
Now let me show you the web browser and the emulator.

20
00:01:16,700 --> 00:01:21,800
So now as you can see here it's going to actually create a new key here and a new value.

21
00:01:21,800 --> 00:01:29,350
So here as you can see we have these key application name and we have this value computerless data right.

22
00:01:29,360 --> 00:01:34,760
So if we actually go to the Android studio here now you can see that we actually specified a reference

23
00:01:35,090 --> 00:01:37,220
to this firebase database instance.

24
00:01:37,250 --> 00:01:42,360
So application name is the actually is the key and the value is computer's data.

25
00:01:42,560 --> 00:01:46,050
So now we want to actually get this data from the server.

26
00:01:46,070 --> 00:01:46,600
Right.

27
00:01:46,610 --> 00:01:48,040
So let's see how we can do that.

28
00:01:48,170 --> 00:01:50,250
So you already know how to do this here.

29
00:01:50,300 --> 00:01:54,800
You can't just create an add value listener here for this key.

30
00:01:55,040 --> 00:02:01,320
So here I can say for your base database instance that get the reference.

31
00:02:01,460 --> 00:02:08,260
So I want to actually create a listener OK and add at a value listener here for this key application

32
00:02:08,260 --> 00:02:08,450
name.

33
00:02:08,450 --> 00:02:11,940
So now let me show you the web browser as you can see we have this key here right.

34
00:02:11,960 --> 00:02:18,080
So now then I want to actually create a listener and add value listener here as you can see here we

35
00:02:18,080 --> 00:02:19,770
can actually get this data.

36
00:02:19,940 --> 00:02:24,980
We can be actually not notified when this data is actually changed.

37
00:02:24,980 --> 00:02:27,640
So let's see first we need to specify the key.

38
00:02:27,650 --> 00:02:33,310
So now managed to copy this value here and now I can paste it here right.

39
00:02:33,340 --> 00:02:37,660
And here I can say that add value event listener.

40
00:02:38,030 --> 00:02:42,150
And here let's actually just type in here new.

41
00:02:42,690 --> 00:02:43,400
Right.

42
00:02:43,400 --> 00:02:48,200
So now after this Apprentice's here let's actually create a new line so that you can see these values

43
00:02:48,200 --> 00:02:48,720
here.

44
00:02:48,740 --> 00:02:52,760
So firebase database instance that gets reference this value.

45
00:02:52,790 --> 00:03:01,100
So here we are referring to this key dot add value event listener and inside Apprentice's new and just

46
00:03:01,100 --> 00:03:05,290
hold the shift key on your keyboard and then press on the leader key on your keyboard.

47
00:03:05,450 --> 00:03:10,840
And now the autocomplete feature of the Android studio is going to help you to choose this option value

48
00:03:10,850 --> 00:03:14,600
event listener and then press enter on your keyboard.

49
00:03:14,630 --> 00:03:20,840
So now you can see here these lines of code here are actually put here automatically by Android studio.

50
00:03:21,050 --> 00:03:24,480
So now at the end of this parenthesis we just need to put a semicolon.

51
00:03:24,740 --> 00:03:25,280
Right.

52
00:03:25,470 --> 00:03:28,500
And now inside is an data change method.

53
00:03:28,610 --> 00:03:33,660
We can easily get the value of this key here as you can see we have this argument right.

54
00:03:33,680 --> 00:03:34,850
Data snapshot.

55
00:03:35,030 --> 00:03:41,030
So this data snapshot argument actually holds the value of this key application.

56
00:03:41,090 --> 00:03:41,700
Right.

57
00:03:41,720 --> 00:03:46,160
We are creating this add value event listener on this key.

58
00:03:46,310 --> 00:03:46,790
Right.

59
00:03:46,790 --> 00:03:52,790
So now this data snapshot actually holds the value of Diski and now I can actually just get that value

60
00:03:52,790 --> 00:03:53,150
here.

61
00:03:53,150 --> 00:03:55,660
So here I can create a string variable.

62
00:03:55,820 --> 00:04:04,510
And here I can say string value or string application name application name assignment operator data

63
00:04:04,520 --> 00:04:05,290
snapshot.

64
00:04:05,370 --> 00:04:07,700
That gets value.

65
00:04:10,160 --> 00:04:16,760
Semi-colon and then in the inside Apprentice's I need to specify the date or type String class.

66
00:04:16,790 --> 00:04:21,010
So here now we've got this value application name.

67
00:04:21,290 --> 00:04:25,170
So now let me show you the emulator here.

68
00:04:25,460 --> 00:04:31,040
As you can see at the top insert this toolbar we have the name of this application app 64.

69
00:04:31,040 --> 00:04:31,580
Right.

70
00:04:31,730 --> 00:04:37,060
But now I want to get the name of the application from the server as you can see here we have this key

71
00:04:37,070 --> 00:04:37,470
right.

72
00:04:37,580 --> 00:04:40,930
Now let me show you the web browser as you can see.

73
00:04:41,240 --> 00:04:46,610
We have this key inside the inside our firebase database and disvalue.

74
00:04:46,730 --> 00:04:51,230
Now I want to change the value of these toolbar as you can see here.

75
00:04:51,380 --> 00:04:53,880
I want to change the value of the application here.

76
00:04:54,110 --> 00:04:57,380
Application Name to this value computer's data.

77
00:04:57,530 --> 00:05:02,630
So in order to do that you can actually just say get support action bar.

78
00:05:02,630 --> 00:05:07,430
So this method gets support action but it's going to actually give us this toolbar here.

79
00:05:07,430 --> 00:05:08,020
Right.

80
00:05:08,240 --> 00:05:15,350
And here I can say that said title get support action by that said title as you can see here this value

81
00:05:15,350 --> 00:05:19,270
of 64 is the title of this action bar here right.

82
00:05:19,280 --> 00:05:21,170
So get support action.

83
00:05:21,170 --> 00:05:23,510
But that said titel application.

84
00:05:23,900 --> 00:05:27,150
So now we are getting the application name from the server.

85
00:05:27,200 --> 00:05:32,560
As you can see here computers later on we are putting that value on the title of this action.

86
00:05:32,960 --> 00:05:41,980
So now let's run our project and now let me show you the web browser and the emulator and here as you

87
00:05:41,980 --> 00:05:48,320
can see the value here the title of this action board is computers they tell you you are getting this

88
00:05:48,320 --> 00:05:49,530
value from the server.

89
00:05:49,550 --> 00:05:55,730
This means that if you actually change this value to another value for example computers and if I press

90
00:05:55,730 --> 00:06:00,490
and enter on my keyboard now this value is also changed.

91
00:06:00,490 --> 00:06:03,280
Computers right.

92
00:06:03,310 --> 00:06:05,410
So hopefully that makes sense.

93
00:06:05,410 --> 00:06:12,660
So let's actually change this value to computers data computers database and the person on your keyboard.

94
00:06:12,670 --> 00:06:16,510
And now you can see this while your computer's database.

95
00:06:16,510 --> 00:06:17,350
Right.

96
00:06:17,350 --> 00:06:19,400
So let's go back to android studio.

97
00:06:19,820 --> 00:06:27,010
And now after this listener after the add value event listener for this application name as you can

98
00:06:27,010 --> 00:06:30,080
see here now inside these uncreate Meffert right.

99
00:06:30,100 --> 00:06:31,600
I am inside these uncreate Meffert.

100
00:06:31,780 --> 00:06:38,310
So now I want to create a listener for this Potin as you can see here.

101
00:06:38,450 --> 00:06:39,070
Right.

102
00:06:39,340 --> 00:06:44,680
So here I can say between sent or update data.

103
00:06:44,890 --> 00:06:45,340
Right.

104
00:06:45,340 --> 00:06:52,370
That said unclick listener new view that unclick listener right.

105
00:06:52,750 --> 00:06:55,440
And now you are Enceladus uncle method.

106
00:06:55,510 --> 00:07:02,080
So first of all I'm going to pace some lines of code here inside the unclick effort here and then I'm

107
00:07:02,080 --> 00:07:04,460
going to explain to you what's going on here.

108
00:07:04,810 --> 00:07:09,730
So as you can see here these are the lines of code that I pasted here.

109
00:07:10,000 --> 00:07:12,770
So look at this line of code here in line number 92.

110
00:07:12,940 --> 00:07:18,090
We have actually a variable of type string and the name of this variable is computer name.

111
00:07:18,370 --> 00:07:25,210
And then I put an assignment operator here and then I refer to this editor EDT computer name.

112
00:07:25,270 --> 00:07:25,640
Right.

113
00:07:25,660 --> 00:07:27,460
So now let me show you the emulator.

114
00:07:27,460 --> 00:07:32,180
So this is actually the EDT computer name that takes that to a stranger.

115
00:07:32,380 --> 00:07:35,760
And then here we are assigning this value to this computer nobody.

116
00:07:35,980 --> 00:07:40,730
So this means that you are actually getting the text value of this as it takes.

117
00:07:40,810 --> 00:07:46,470
And we are converting it to our string value and then we are assigning that as string value to this

118
00:07:46,470 --> 00:07:48,490
computer named string variable.

119
00:07:48,520 --> 00:07:49,630
Right.

120
00:07:49,630 --> 00:07:55,030
And again in line number 93 if you have another string variable and the name of this value event is

121
00:07:55,030 --> 00:07:57,810
computer power assignment operator.

122
00:07:57,980 --> 00:07:59,540
EDT computer power.

123
00:07:59,590 --> 00:08:02,560
So this idiotic computer power refers to this as the text.

124
00:08:02,590 --> 00:08:03,530
Right.

125
00:08:03,670 --> 00:08:07,240
It is the computer power that get text that restraint.

126
00:08:07,450 --> 00:08:13,090
And here we are assigning that string value to this computer power line number 44.

127
00:08:13,300 --> 00:08:14,810
Number 94.

128
00:08:14,830 --> 00:08:21,990
We have another string variable and the name of this variable is computer speed assignment operator.

129
00:08:22,220 --> 00:08:26,300
EDT computer speed that get text that too strange.

130
00:08:26,320 --> 00:08:27,970
So EDT computer speed.

131
00:08:27,970 --> 00:08:29,850
Is this value right.

132
00:08:29,860 --> 00:08:35,770
We are getting the value of this he takes the computer's speed and then we are actually converting that

133
00:08:35,770 --> 00:08:37,370
value to us think value.

134
00:08:37,390 --> 00:08:41,760
And here we are assigning that value to this computer speed value.

135
00:08:42,310 --> 00:08:45,580
So here we are doing the same thing to this computer run valuable.

136
00:08:45,580 --> 00:08:50,800
So here we have a variable of type streambed computer ramp assignment operator.

137
00:08:50,850 --> 00:08:52,010
It is the computer RAM.

138
00:08:52,060 --> 00:08:56,570
So this is the computer Romley First it takes that gettext that restraint.

139
00:08:56,740 --> 00:09:03,880
And here we are assigning that value to this computer I'm in line number 96 as you can see here we have

140
00:09:03,970 --> 00:09:10,500
another variable which is of type string and the name is computer screen assignment operator.

141
00:09:10,660 --> 00:09:12,090
It is the computer screen.

142
00:09:12,190 --> 00:09:18,860
So as you can see this value is referring to this edit text editing computer screen that get it that

143
00:09:18,940 --> 00:09:20,600
get text that to history.

144
00:09:20,800 --> 00:09:27,850
So here it is actually assigning that string value to this computer screen up valuable an inline number

145
00:09:27,850 --> 00:09:28,720
97.

146
00:09:28,720 --> 00:09:33,490
We have another rowdier bill and again the data type of this variable is strange.

147
00:09:33,760 --> 00:09:37,300
Assignment operator it is the computer keyboard.

148
00:09:37,300 --> 00:09:42,360
So here we are referring to this actually this eddy takes it into a computer keyboard.

149
00:09:42,610 --> 00:09:46,540
And now that good text that too is strange.

150
00:09:46,570 --> 00:09:46,980
Right.

151
00:09:46,990 --> 00:09:53,770
So here you are assigning this string value to a computer keyboard string variable and in line number

152
00:09:53,770 --> 00:09:54,590
98.

153
00:09:54,610 --> 00:10:01,840
We have another variable and the name of this value event is our computer CPQ assignment operator EDT

154
00:10:01,890 --> 00:10:06,520
computer Sibiu So this computer security is referring to this as it takes.

155
00:10:06,520 --> 00:10:07,360
Right.

156
00:10:07,400 --> 00:10:13,570
EDT computer Sibiu that get text that restraint and we are assigning the value of this string value

157
00:10:13,570 --> 00:10:20,830
as you can see here the value of the EDT computer APCP you to this computer Sibiu body.

158
00:10:21,130 --> 00:10:26,590
So now I'm going to pasting some more lines of code here inside this uncle some of it and then I'm going

159
00:10:26,590 --> 00:10:28,490
to explain to you what's going on here.

