1
00:00:00,510 --> 00:00:02,950
Let's actually learn our project here.

2
00:00:03,090 --> 00:00:08,850
So just click on this button here and now it's going to run our application here.

3
00:00:09,060 --> 00:00:11,690
So now let me show you the web browser here.

4
00:00:12,030 --> 00:00:14,270
And here is our web browser here.

5
00:00:14,520 --> 00:00:16,930
And now let me show you the emulator.

6
00:00:17,100 --> 00:00:19,420
So now let me check here.

7
00:00:19,470 --> 00:00:22,340
Now as you can see it is actually luncheonette application.

8
00:00:22,350 --> 00:00:27,900
And here it is saying that instead Thrun applied code changes and restarted the app.

9
00:00:27,900 --> 00:00:29,590
So now our application is ready.

10
00:00:29,760 --> 00:00:32,500
So now let me show you the web browser and the emulator.

11
00:00:32,730 --> 00:00:36,710
So now I want to specify the computer name right.

12
00:00:36,720 --> 00:00:42,820
So here I can see that my computer name is iPhone iPhone for example 5.

13
00:00:43,110 --> 00:00:43,720
Right.

14
00:00:44,100 --> 00:00:50,000
And the computer power is one example of one thousandth the computer's speed is 2000.

15
00:00:50,220 --> 00:00:53,490
The computer room is five thousand as you can see here.

16
00:00:53,890 --> 00:00:58,090
And computer screen is retina touch screen

17
00:01:00,560 --> 00:01:06,540
screen as you can see here touch screen computer keyboard is virtual here.

18
00:01:06,560 --> 00:01:12,760
I can say for example virtual keyboard right virtual keyboard.

19
00:01:13,090 --> 00:01:17,480
And now let me make this cheap virtual keyboard here actually disappeared.

20
00:01:17,480 --> 00:01:23,240
We have the computer CPO So here I can say Apple C.P. you right.

21
00:01:23,630 --> 00:01:29,580
So now as you can see here we have these data and here as you can see the text of this button is produced

22
00:01:29,640 --> 00:01:32,090
in your computer and sent it to server.

23
00:01:32,280 --> 00:01:36,900
So you already know why this text is here because let's go to Android studio.

24
00:01:37,080 --> 00:01:41,470
As you can see here inside this uncreate Smurfette Let me show you the angry at me.

25
00:01:41,490 --> 00:01:43,180
This is our uncreate method right.

26
00:01:43,190 --> 00:01:49,340
And here as you can see we put this line of code here to change the text of send or update button.

27
00:01:49,350 --> 00:01:51,050
According to the situation.

28
00:01:51,150 --> 00:01:56,990
So this uncreate Meffert here is going to be actually called when the user actually opens the application

29
00:01:57,000 --> 00:01:57,550
right.

30
00:01:57,800 --> 00:02:01,320
And now as you can see here it's going to actually look at this line of thought here and it's going

31
00:02:01,320 --> 00:02:02,520
to execute the Smurfit.

32
00:02:02,520 --> 00:02:05,280
So now let me actually hold the comment here on my keyboard.

33
00:02:05,460 --> 00:02:10,380
And if you are using a Windows machine you need to actually just hold the control on your keyboard and

34
00:02:10,380 --> 00:02:12,830
then click on this line of code here.

35
00:02:12,900 --> 00:02:17,490
This method as you can see now as you can see here this is our Meffert right.

36
00:02:17,520 --> 00:02:21,210
Private's will it change the text of send or update button.

37
00:02:21,300 --> 00:02:26,220
According to the situation and it's going to actually look at the value of this unique computer I.D.

38
00:02:26,310 --> 00:02:32,250
It's going to check that this barrier is actually empty or not if it is empty then it's going to actually

39
00:02:32,580 --> 00:02:36,110
set the text produced in your computer and send it to server.

40
00:02:36,120 --> 00:02:41,220
So as you can see here this is that value and that that means that the value of this unique computer

41
00:02:41,220 --> 00:02:42,870
ID now is empty.

42
00:02:42,930 --> 00:02:43,470
Right.

43
00:02:43,710 --> 00:02:49,380
And if it if it is not empty then it can actually be said this text here modified to produce computer

44
00:02:49,380 --> 00:02:50,180
data.

45
00:02:50,550 --> 00:02:53,300
So now let's actually click on this button.

46
00:02:54,060 --> 00:02:57,270
Now as you can see here as you can see here the text fields are empty.

47
00:02:57,270 --> 00:03:03,460
Now let's go to our web browser and here you can see that the data is on here.

48
00:03:03,480 --> 00:03:03,900
Right.

49
00:03:04,020 --> 00:03:06,420
So here we have these computers category.

50
00:03:06,570 --> 00:03:09,510
So I told you about this computers category.

51
00:03:09,510 --> 00:03:09,920
Right.

52
00:03:09,960 --> 00:03:12,260
Because let's go to our Android studio.

53
00:03:12,330 --> 00:03:18,800
As you can see here inside our uncreate Smurfette here in line number are actually in line number six

54
00:03:18,810 --> 00:03:20,340
the eight as you can see.

55
00:03:20,520 --> 00:03:24,080
You referred to this database reference assignment operator.

56
00:03:24,210 --> 00:03:27,530
And then I refer to these firebase database instance.

57
00:03:27,540 --> 00:03:29,250
So let me show you the web browser.

58
00:03:29,400 --> 00:03:32,310
So this is our firebase database instance right.

59
00:03:32,310 --> 00:03:38,010
This is our firebase database instance that gets reference so now I want to actually get a reference

60
00:03:38,370 --> 00:03:40,320
to the computers category.

61
00:03:40,320 --> 00:03:47,580
So we created this chattily computers category and then we clicked on their produce and and you actually

62
00:03:47,700 --> 00:03:48,840
computer object right.

63
00:03:48,840 --> 00:03:53,400
So let's look at our Mefford produce in your computer object.

64
00:03:53,430 --> 00:04:00,960
So as you can see here let's find RMF So this is RMF it produce a new computer and put it in the database.

65
00:04:00,960 --> 00:04:06,570
So when I clicked on this on this button as you can see here and at the takes of this button is modified

66
00:04:06,570 --> 00:04:07,980
to produce the computer data.

67
00:04:07,980 --> 00:04:10,840
So now we can actually update that data.

68
00:04:10,980 --> 00:04:16,050
But now when I first click clicked on the spot and when I actually hear the computer data.

69
00:04:16,350 --> 00:04:22,320
And and first clicked on this button first it actually executed this method produce in your computer

70
00:04:22,320 --> 00:04:27,200
in the database and put it in the database as you can see here for this kind of Chafer that this up

71
00:04:27,450 --> 00:04:29,680
this unique computer ID value.

72
00:04:29,700 --> 00:04:34,190
But it's actually actually empty or not if it is empty then it's going to have the same effect here

73
00:04:34,470 --> 00:04:41,040
and it's going to create our Random unique ID right database that the database reference that push.

74
00:04:41,040 --> 00:04:46,290
So this piece of code here is going to actually create a random unique ID in the day in the firebase.

75
00:04:46,290 --> 00:04:48,680
So now let me show you the web browser as you can see here.

76
00:04:48,800 --> 00:04:53,400
Inside this computers category we have this random unique ID.

77
00:04:53,520 --> 00:04:53,900
Right.

78
00:04:54,000 --> 00:04:57,150
So that's the job of this piece of code here.

79
00:04:57,210 --> 00:05:02,340
Database reference that push right this unique ID and then we call the gate key.

80
00:05:02,340 --> 00:05:07,040
So it's going to actually get this value and assign it to this unique computer I.D. because of tapes

81
00:05:07,040 --> 00:05:07,400
3.

82
00:05:07,410 --> 00:05:08,310
Right.

83
00:05:08,400 --> 00:05:14,160
And then it's going to create a computer object with the values that we pass to the Smurfette so we

84
00:05:14,160 --> 00:05:15,360
pass these values.

85
00:05:15,360 --> 00:05:19,600
For example the computer is Apple's CPQ right.

86
00:05:19,690 --> 00:05:21,610
He created these values.

87
00:05:21,720 --> 00:05:23,320
These values for this object.

88
00:05:23,430 --> 00:05:25,490
And here now we have this object.

89
00:05:25,710 --> 00:05:27,860
And here we said database reference.

90
00:05:27,870 --> 00:05:33,700
So this database difference now is actually referring to these computers category right.

91
00:05:33,720 --> 00:05:36,650
And here we are saying that child unique computer ID.

92
00:05:36,650 --> 00:05:38,910
So here we are referring to this.

93
00:05:39,120 --> 00:05:42,630
And here you are saying that set value computer.

94
00:05:42,780 --> 00:05:50,070
So it's going to actually treat this idea as a category because we are actually sitting on an object

95
00:05:50,580 --> 00:05:51,540
to this child.

96
00:05:51,630 --> 00:05:57,750
So it's going to actually pro-white keys and values according to the actually the names of the instance

97
00:05:57,750 --> 00:05:59,760
variables of this object.

98
00:05:59,790 --> 00:06:04,950
So let's go inside our computer class as you can see here we have this instance variables inside this

99
00:06:04,950 --> 00:06:05,730
class.

100
00:06:05,730 --> 00:06:08,430
Look at these kids here for example computers CPQ.

101
00:06:08,460 --> 00:06:09,210
Right.

102
00:06:09,210 --> 00:06:14,370
So let's find the computer see you here as you can see it's going to look at this value computer spew.

103
00:06:14,610 --> 00:06:21,100
And it's going to put it as the key as it can here as the key of our value app LCP you right.

104
00:06:21,150 --> 00:06:22,720
It's just the same key.

105
00:06:22,920 --> 00:06:27,000
Or for example look at these key computer keyboard as you can see here.

106
00:06:27,090 --> 00:06:30,650
Now we have this the name of this instance valuable as you can see here.

107
00:06:30,660 --> 00:06:32,970
This is the same or computer name.

108
00:06:32,970 --> 00:06:36,850
Here we have computer name or there for example computer power.

109
00:06:36,870 --> 00:06:43,650
Here we have computer power or for example a computer up speed here.

110
00:06:43,800 --> 00:06:46,950
Here we have computers speed or computer RAM.

111
00:06:47,010 --> 00:06:49,660
Here we have computer RAM and so on.

112
00:06:49,680 --> 00:06:50,250
Right.

113
00:06:50,250 --> 00:06:53,270
So let's go back to human activity of a fight as you can see here.

114
00:06:53,280 --> 00:07:00,240
We set our objects to produce ID and then as you can see here it actually treated this key as the category

115
00:07:00,510 --> 00:07:02,650
and put these keys and values here.

116
00:07:02,760 --> 00:07:03,330
Right.

117
00:07:03,660 --> 00:07:08,340
And here it's got it actually changed the text of our button as you can see here.

118
00:07:08,340 --> 00:07:10,590
Now the text of this button is changed.

119
00:07:10,590 --> 00:07:11,280
Right.

120
00:07:11,280 --> 00:07:11,880
Why.

121
00:07:11,880 --> 00:07:15,970
Because now this unique computer ID is not empty.

122
00:07:16,230 --> 00:07:16,700
Right.

123
00:07:16,830 --> 00:07:20,550
So this unique computer ID now has a value.

124
00:07:20,580 --> 00:07:25,140
So instead it's going actually up there so you actually click on this button again.

125
00:07:25,260 --> 00:07:28,580
So now let's actually go inside our uncreate method here.

126
00:07:28,710 --> 00:07:32,760
Let me show you that here Betty and sent or updated data right.

127
00:07:32,930 --> 00:07:35,810
That's listener first that first.

128
00:07:35,820 --> 00:07:42,360
When we click on the spot in as you can see it's going to get the values of these take the texts and

129
00:07:42,360 --> 00:07:44,890
it's going to assign them to these other variables.

130
00:07:44,940 --> 00:07:49,790
And it's going to execute these lines of code here and then it's going to actually look at these IIF

131
00:07:49,860 --> 00:07:51,890
statement here at this if else statement.

132
00:07:52,050 --> 00:07:55,970
And it says it takes utility that is into your computer ID.

133
00:07:56,130 --> 00:08:01,070
So now as you can see here because you can get your computer ID has value.

134
00:08:01,080 --> 00:08:04,000
Now this expression here evaluates to false.

135
00:08:04,020 --> 00:08:04,590
Why.

136
00:08:04,590 --> 00:08:11,370
Because you need a computer ID is not empty this valuable unique computer ID has a value has a value

137
00:08:11,370 --> 00:08:11,730
right.

138
00:08:11,820 --> 00:08:16,100
So there's a solution here evaluates to false and it's not going to execute this statement.

139
00:08:16,170 --> 00:08:17,760
Instead it's going to execute this.

140
00:08:17,790 --> 00:08:23,050
Else they meant and it's going actually be modified to produce the computer here.

141
00:08:23,060 --> 00:08:23,370
Right.

142
00:08:23,370 --> 00:08:25,040
Modified to produce a computer.

143
00:08:25,230 --> 00:08:31,740
And here I can actually update that actually the values the date of my computer.

144
00:08:31,740 --> 00:08:36,460
So for example as you can see here we called the Smurfette and we passed the computer name power speed

145
00:08:36,480 --> 00:08:40,710
RAM screen keyboard Seip you get these values from these texts.

146
00:08:40,710 --> 00:08:43,770
So let's actually go to our web browser here.

147
00:08:44,130 --> 00:08:47,390
And now let me show you the emulator here.

148
00:08:47,430 --> 00:08:50,160
So this is our emulator and this is our web browser right.

149
00:08:50,370 --> 00:08:55,570
So now for example I decide to actually change the value of my computer speed.

150
00:08:55,650 --> 00:08:56,710
So as you can see here.

151
00:08:56,800 --> 00:08:59,440
Let's let's look at our computers here.

152
00:08:59,460 --> 00:09:01,110
This is 2000 right.

153
00:09:01,110 --> 00:09:05,550
Let's change this value to for example of 5000.

154
00:09:05,550 --> 00:09:06,180
Right.

155
00:09:06,480 --> 00:09:11,920
So now let's just click on this button modified to produce computer data.

156
00:09:12,210 --> 00:09:17,130
And now it's going to actually update the value of this computer speed.

157
00:09:17,130 --> 00:09:17,730
Right.

158
00:09:17,730 --> 00:09:26,070
So let's for example change the name of my computer to for example iPhone 4 iPhone 4.

159
00:09:26,070 --> 00:09:26,630
Right.

160
00:09:26,670 --> 00:09:29,540
So now I want to update the name the name of my computer.

161
00:09:29,550 --> 00:09:33,320
I don't want the iPhone 5 s for example I want this iPhone 4.

162
00:09:33,570 --> 00:09:40,050
So let's click on this button here modified to produce computer data and now it says iPhone 4 or here

163
00:09:40,050 --> 00:09:44,990
we can also say for example galaxy Galaxy 5.

164
00:09:45,480 --> 00:09:51,420
And then if you click on this button again now again it's going to update the name of my computer or

165
00:09:51,510 --> 00:09:56,910
here I can say for example physical and physical keyboard.

166
00:09:56,910 --> 00:09:59,220
And then if I click on this button here.

167
00:09:59,520 --> 00:10:02,980
Now as you can see here this data is actually updated.

168
00:10:03,390 --> 00:10:05,850
So hopefully that makes sense.

169
00:10:06,120 --> 00:10:13,610
And now that we actually since these data to the server we have these objects right with this ID.

170
00:10:13,620 --> 00:10:16,380
Now I want to get this data from the server.

171
00:10:16,470 --> 00:10:20,000
So let's actually click on the spot and get data from server.

172
00:10:20,880 --> 00:10:22,710
And now you can see these data here.

173
00:10:22,710 --> 00:10:23,600
Right.

174
00:10:23,640 --> 00:10:26,640
We successfully got this data from the server.

175
00:10:26,670 --> 00:10:32,980
So for example as you can see here these text view is actually inside a horizontal scroll view.

176
00:10:33,030 --> 00:10:37,200
So that's why you can see that I can actually scroll here to the left or right.

177
00:10:37,200 --> 00:10:45,370
In order to see the values and it says computer name is Galaxy 5 dash computer power is 1000 dash computer

178
00:10:45,390 --> 00:10:47,540
speed is 5000.

179
00:10:47,760 --> 00:10:52,960
As you can see here the computer that is 5000 computer screen and these values here.

180
00:10:52,980 --> 00:10:53,520
Right.

181
00:10:53,520 --> 00:10:57,370
So let's actually change for example change the computer name here.

182
00:10:57,480 --> 00:11:01,510
Now let's see that how this actually is going to be updated.

183
00:11:01,620 --> 00:11:03,500
So let's change the computer name here.

184
00:11:03,510 --> 00:11:11,680
For example I can't say that I want my computer name to be for example matchbooks pro MacBook Pro.

185
00:11:11,850 --> 00:11:12,350
Right.

186
00:11:12,560 --> 00:11:18,210
And now if I actually press on until here on my keyboard as you can see here these values must be inside

187
00:11:18,210 --> 00:11:21,630
to double quotes because this is going to be a stunning value.

188
00:11:21,630 --> 00:11:27,440
So here I have a MacBook Pro and in-person interview on your keyboard.

189
00:11:27,650 --> 00:11:32,700
And now let me show you the the emulator here and here it is saying that the computer name is Mac which

190
00:11:32,700 --> 00:11:37,310
pro it has successfully got the data from the server.

191
00:11:37,320 --> 00:11:44,070
So when I change the data here it's going to also change this data here so we can also update data here.

192
00:11:44,070 --> 00:11:52,250
For example I can say that the computer for example the computer you should be for example code I-78

193
00:11:53,200 --> 00:11:55,760
core is 7.

194
00:11:56,280 --> 00:12:01,330
So now if I click on the spot in here I'll modify it to produce the computer data.

195
00:12:01,680 --> 00:12:08,490
As you can see here now here the computer name is Galaxy 5 because we actually passed this value as

196
00:12:08,490 --> 00:12:12,230
the computer name the computer's speed is 5000 here.

197
00:12:12,270 --> 00:12:17,700
As you can see and the computer CPO Let's actually scroll to the left as you can see the computer is

198
00:12:17,700 --> 00:12:18,990
called Seven.

199
00:12:19,020 --> 00:12:24,000
So when you update these data here these data and I actually get this data from the server.

200
00:12:24,000 --> 00:12:26,280
These data are also going to be updated.

201
00:12:26,340 --> 00:12:26,860
Right.

202
00:12:26,880 --> 00:12:28,740
This is very fast.

203
00:12:28,740 --> 00:12:36,240
A firebase is the best backend if you want to actually create applications that use that needs to be

204
00:12:36,240 --> 00:12:39,690
actually connected to the server which is the best.

205
00:12:39,720 --> 00:12:40,750
This is very fast.

206
00:12:40,920 --> 00:12:49,200
So now for example if I actually want to just just let me actually close this application here for example.

207
00:12:49,200 --> 00:12:54,070
Now I want to close this application here and this one and this one right.

208
00:12:54,210 --> 00:12:56,810
So now let's actually run our application again.

209
00:12:57,000 --> 00:13:00,580
So the name of our application was absolutely for right.

210
00:13:00,900 --> 00:13:08,010
And now as you can see here again when we actually run our application here the value of our let me

211
00:13:08,010 --> 00:13:09,540
go to our Android studio.

212
00:13:09,690 --> 00:13:14,400
The value of our valuable Junichi computer ID again it is actually empty right.

213
00:13:14,400 --> 00:13:17,080
So then I actually want to create another instance.

214
00:13:17,080 --> 00:13:21,240
So let me show you the web browser and this one.

215
00:13:21,240 --> 00:13:24,170
So this actually create another computer for instance.

216
00:13:24,300 --> 00:13:30,420
So the name of my computer this time is for example Windows Windows PC.

217
00:13:30,810 --> 00:13:31,780
Right.

218
00:13:31,950 --> 00:13:39,710
And the computer power is 2000 computer it is 3000 Computerland is 4000 right.

219
00:13:39,720 --> 00:13:48,660
The computer screen is for example touch screen touch screen the computer keyboard is for example virtual

220
00:13:48,750 --> 00:13:51,800
and the computer is called I fight.

221
00:13:51,870 --> 00:13:53,630
For example quote I fight.

222
00:13:53,950 --> 00:13:57,820
And now if I click and click on this button here let's see what happens.

223
00:13:57,820 --> 00:14:01,140
Produced in your computer and send it to server right.

224
00:14:02,360 --> 00:14:08,440
And now it's going to actually create another instance and other ID inside these computers category.

225
00:14:08,480 --> 00:14:09,390
Right.

226
00:14:09,470 --> 00:14:15,440
And here as you can see we have these data computers C-p you call like five virtual computer keyboard

227
00:14:15,600 --> 00:14:20,290
a computer keyboard is virtual computer name is Windows PC computer.

228
00:14:20,300 --> 00:14:27,230
However it's 2000 computer Ramey's 4000 computer screen is touchscreen and the computer speed is 3000.

229
00:14:27,260 --> 00:14:30,030
And now let's click on the spot and get data from server.

230
00:14:30,140 --> 00:14:32,790
And now we get that data of this instance.

231
00:14:32,900 --> 00:14:33,750
Right.

232
00:14:33,880 --> 00:14:38,970
Computer Name is Windows PC computer power is 2000 and all these data.

233
00:14:39,080 --> 00:14:39,760
Right.

234
00:14:39,770 --> 00:14:41,790
So you can scroll and see all these.

235
00:14:43,030 --> 00:14:44,880
So I think that's it.

236
00:14:44,890 --> 00:14:50,650
And now we can actually figure out how to actually send data to the server and to how to update it how

237
00:14:50,650 --> 00:14:53,270
to get it to get data from the server.

238
00:14:53,350 --> 00:14:59,650
And if we're going to actually create more and more applications and connect them to our firebase database

239
00:14:59,680 --> 00:15:07,060
in order to learn more topics in order to learn more concepts about using firebase as the backend about

240
00:15:07,060 --> 00:15:08,060
applications.

241
00:15:08,410 --> 00:15:13,900
For now just this is enough and if you have any questions about these concepts that I taught you please

242
00:15:13,900 --> 00:15:17,960
post the discussion in the course and then I'll do my best to answer all of your questions.

243
00:15:18,190 --> 00:15:21,460
Thank you very much for watching and I'll see you in the next year Tauriel.

