1
00:00:00,270 --> 00:00:04,500
Hi everyone in this tutorial we're going to continue building this application.

2
00:00:04,500 --> 00:00:06,990
So first let's run the application.

3
00:00:06,990 --> 00:00:13,130
Now let me show you the emulator and here you can see that these buttons are actually on the top edge

4
00:00:13,170 --> 00:00:14,130
of this view.

5
00:00:14,160 --> 00:00:15,590
There is a problem here.

6
00:00:15,780 --> 00:00:19,470
Let's go back to android soon and let's go to this activity on the last minute exam.

7
00:00:19,680 --> 00:00:25,470
And here you can see that before go to create a constraint from the top edge of this button to the bottom

8
00:00:25,470 --> 00:00:30,370
edge of these critics for example so that you can see this little circle that is pulsating.

9
00:00:30,450 --> 00:00:34,380
So here let's create a constraint to the bottom edge of this.

10
00:00:34,400 --> 00:00:37,100
It takes here and release it.

11
00:00:37,110 --> 00:00:39,120
So now you can see that this constraint is created.

12
00:00:39,120 --> 00:00:44,480
So let's actually change the top margin of this button here cinches this number to number 10.

13
00:00:45,350 --> 00:00:49,120
And then person it'll change your keyboard so you can see that it's not changing.

14
00:00:49,310 --> 00:00:53,000
And it's not allowing this margin here to be actually executed.

15
00:00:53,000 --> 00:00:57,080
I think it's a bug in Android studio and in the newest version of Android studio.

16
00:00:57,350 --> 00:01:00,210
So let's actually select a spot in here again.

17
00:01:00,230 --> 00:01:05,870
Let's create a constraint to the bottom edge of this button here.

18
00:01:05,870 --> 00:01:08,910
Now let's also change the top margin to number 10.

19
00:01:09,990 --> 00:01:17,560
So now that we have this this constraint actually create it let's run the application.

20
00:01:17,580 --> 00:01:19,770
Let me show you the emulator.

21
00:01:19,770 --> 00:01:24,540
So now you can see that these buttons are actually position here correctly.

22
00:01:24,540 --> 00:01:26,310
So let's go back to roundlets studio.

23
00:01:26,550 --> 00:01:30,120
Let's click on this main activity so now let me show you the emulator.

24
00:01:30,120 --> 00:01:36,000
So first we need to actually declare some objects of type text and we need to also create some objects

25
00:01:36,240 --> 00:01:37,150
of a button.

26
00:01:37,350 --> 00:01:43,450
So here inside this main activity class to stay in here private as it takes.

27
00:01:43,920 --> 00:01:46,200
And here I can say EDT.

28
00:01:46,500 --> 00:01:53,100
Enter name but I can't say it is in the name semicolon private.

29
00:01:53,320 --> 00:02:06,070
It takes EDT M8 semicolon private's edit text EDT password semi-colon.

30
00:02:06,070 --> 00:02:07,640
Now let's declare the button.

31
00:02:07,660 --> 00:02:19,300
So private's BOTTEN PTEN signing semicolon and private's button.

32
00:02:20,580 --> 00:02:26,260
And sign up between Sign up semicolon.

33
00:02:26,300 --> 00:02:32,270
So now let's go inside this uncreate method and let's initialize our objects here our value is actually.

34
00:02:32,480 --> 00:02:36,520
So here the first one is it is the name assignment operator.

35
00:02:36,740 --> 00:02:44,100
Let's cast this object to an edit text object find view by ID or ID that EDT.

36
00:02:44,360 --> 00:02:45,470
Idiotcy internet.

37
00:02:45,500 --> 00:02:49,950
EDT enter ne semicolon EDT.

38
00:02:49,960 --> 00:02:50,660
E-mail.

39
00:02:50,830 --> 00:02:51,700
Assignment operator.

40
00:02:51,700 --> 00:02:59,100
Let's cast this object to an edit text object find view by ID or ID that EDT.

41
00:02:59,320 --> 00:03:00,290
Email.

42
00:03:00,630 --> 00:03:02,760
EDT enter the email actually semicolon.

43
00:03:03,100 --> 00:03:07,060
And finally EDT password assignment operator.

44
00:03:07,510 --> 00:03:15,640
Let's cast this object to an edit text object find view ID or that Id dot EDT password EDT Enter password

45
00:03:15,680 --> 00:03:22,510
semicolon and and here I can't see PTEN assigning assignment operator unless this object to a button

46
00:03:22,540 --> 00:03:29,460
object find view by ID or that ID that PTEN sign in semicolon.

47
00:03:29,770 --> 00:03:38,920
And finally here and sign up assignment operator button find you by ID or thought Id Dud's PTEN sign

48
00:03:39,010 --> 00:03:40,630
up semicolon.

49
00:03:40,780 --> 00:03:46,270
So now it's time to connect our Android studio project to the firebase.

50
00:03:46,510 --> 00:03:50,120
So here at the top menu here you can see these tools here right.

51
00:03:50,120 --> 00:03:53,490
Just click on Tools and then click on firebase.

52
00:03:53,570 --> 00:03:56,060
So he had this assistant is actually open right.

53
00:03:56,150 --> 00:03:58,250
So now we have this often dictation.

54
00:03:58,460 --> 00:03:59,570
So look at this description.

55
00:03:59,570 --> 00:04:07,310
It says signing and manage users with ease accept accepting emails Google signing Facebook and other

56
00:04:07,310 --> 00:04:08,580
luggin providers.

57
00:04:08,750 --> 00:04:13,270
So let's click on it and click on email and password and dictation.

58
00:04:13,310 --> 00:04:17,850
First we need to connect our application to the Firebrace So just click on this button.

59
00:04:17,990 --> 00:04:24,440
Now it says starting connect dialog out this window is opened here now we are going to create a new

60
00:04:24,440 --> 00:04:27,500
Firebrace project firebase a fire authentication.

61
00:04:27,510 --> 00:04:30,990
So this is going to be the name of our firebase project.

62
00:04:31,070 --> 00:04:37,790
So here I just need to so here make sure to actually specify a country or region and click on connected

63
00:04:37,790 --> 00:04:44,000
to Firebrace so that this message pops up and says firebase project create it and collect connected

64
00:04:44,000 --> 00:04:46,000
locally to module app..

65
00:04:46,040 --> 00:04:47,270
Now it's connected right.

66
00:04:47,290 --> 00:04:51,430
So now it's time to add firebase often to Kaisha to our application.

67
00:04:51,620 --> 00:04:55,080
So just click on the spot in and click on accept changes.

68
00:04:55,100 --> 00:04:59,160
So here it says dependencies set up correctly right.

69
00:04:59,330 --> 00:05:02,160
So now let me show you the browser here.

70
00:05:02,210 --> 00:05:03,000
Firebrace.

71
00:05:03,050 --> 00:05:04,740
So let's go to console.

72
00:05:04,780 --> 00:05:07,920
Now you can see our project here right.

73
00:05:08,010 --> 00:05:11,180
Firebrace fired authentication.

74
00:05:11,230 --> 00:05:12,540
Right let's click on this one here.

75
00:05:12,540 --> 00:05:14,140
This is the name of our project.

76
00:05:14,160 --> 00:05:17,640
Now let's click on often to cation.

77
00:05:17,710 --> 00:05:20,500
So here let's actually set up sign in Meffert.

78
00:05:20,510 --> 00:05:22,810
Leslie can see this pattern here.

79
00:05:22,810 --> 00:05:25,420
Now you can see this e-mail or passwords right.

80
00:05:25,420 --> 00:05:27,640
So here you can see this a little.

81
00:05:27,640 --> 00:05:32,180
I can hear this pencil I can actually click on it.

82
00:05:32,230 --> 00:05:34,240
Now lets enable this option here.

83
00:05:34,240 --> 00:05:35,290
Email or passport.

84
00:05:35,290 --> 00:05:39,780
And it says allow users to sign up using their email address and password.

85
00:05:39,910 --> 00:05:47,320
Or as the case also provide e-mail address verification password recovery and email address change primitives.

86
00:05:47,320 --> 00:05:49,600
You can actually take a look at the documentation.

87
00:05:49,600 --> 00:05:54,290
Let me open it another tap here so you can see actually the documentation here.

88
00:05:54,340 --> 00:05:57,790
So now let me close this this top here.

89
00:05:57,790 --> 00:06:02,350
So let's click on safe here so as you can see are actually enabled this option.

90
00:06:02,380 --> 00:06:05,020
Let's click on safe.

91
00:06:05,070 --> 00:06:07,370
Now it says e-mail or password enabled.

92
00:06:07,410 --> 00:06:07,940
Right.

93
00:06:08,010 --> 00:06:11,070
So now let's go back to android studio.

94
00:06:11,310 --> 00:06:14,500
So first let me show you these tabs here we can see you can see these.

95
00:06:14,520 --> 00:06:19,110
This users stop if I click on it you can see that it says no users for this project.

96
00:06:19,260 --> 00:06:26,190
So if any users actually sign up to our application we can see those users here.

97
00:06:26,280 --> 00:06:28,690
So let's go back to android city.

98
00:06:28,980 --> 00:06:32,290
And here let me actually close this assistant here.

99
00:06:32,790 --> 00:06:36,900
So now let's actually declared a valuable insight.

100
00:06:36,900 --> 00:06:39,840
Our main activity so just open here private.

101
00:06:40,020 --> 00:06:45,990
And the name of this rally is going to be firebase of and the name is going to be firebase over semicolon.

102
00:06:46,320 --> 00:06:53,450
So let's go inside our uncreate Smurfette here and here let's initialize our variable firebase of so

103
00:06:53,540 --> 00:07:00,660
they've been here firebase of assignment operator and just that here firebase of that get instance semi-colon.

104
00:07:00,660 --> 00:07:06,860
So first of all we need to actually create an effort in order to allow the user to sign up to our application.

105
00:07:07,140 --> 00:07:12,440
So inside this class inside this main activity class here before the curly brace of these main activity

106
00:07:12,450 --> 00:07:13,780
class I'm going to create a method.

107
00:07:13,830 --> 00:07:23,280
So just type in here private's Voyt and the name of this method is sign up sign up user.

108
00:07:23,460 --> 00:07:28,700
We e-mailed and password.

109
00:07:28,800 --> 00:07:30,380
So let's put up her of here.

110
00:07:30,380 --> 00:07:36,810
The first argument the first parameter here of this method is going to be of type streams and the name

111
00:07:37,020 --> 00:07:39,180
is going to be e-mail.

112
00:07:39,240 --> 00:07:41,730
Use that e-mail user e-mail.

113
00:07:41,890 --> 00:07:42,610
Come on.

114
00:07:42,870 --> 00:07:48,660
And the second parameter is going to be again of type streams and the name is going to be user password.

115
00:07:48,660 --> 00:07:53,640
So let's open and closed this method by using the curly braces so insert is Smurfette.

116
00:07:53,640 --> 00:08:02,310
So I can't say firebase of that create user with IIM-A and password here.

117
00:08:02,310 --> 00:08:06,270
So now you can see that this Meffert accepts two arguments.

118
00:08:06,270 --> 00:08:08,360
The first one is going to be the emet right.

119
00:08:08,360 --> 00:08:14,390
So we have an argument here from the Smurfit so I can see a user M8 comma user password.

120
00:08:14,400 --> 00:08:16,090
The second one is password right.

121
00:08:16,110 --> 00:08:17,070
It was a password.

122
00:08:17,580 --> 00:08:19,830
And let me create a new line here.

123
00:08:19,860 --> 00:08:24,840
I can actually put it here because I want to show you that I am going to call another method on these.

124
00:08:24,850 --> 00:08:26,800
And the result of the Smurfette.

125
00:08:27,030 --> 00:08:33,250
So I can't say that at uncomplete listener.

126
00:08:33,390 --> 00:08:38,560
So this is if it actually needs two arguments the first one is going to be the activity here.

127
00:08:38,700 --> 00:08:45,120
So let's specify the activity just like in human activity that this coma and now we need to actually

128
00:08:45,250 --> 00:08:49,520
created the anonymous in a class and you in on your instance.

129
00:08:49,860 --> 00:08:52,650
So just open a new on.

130
00:08:52,690 --> 00:08:57,880
So just put this or here is just hold down the shift key on your keyboard and then present the little

131
00:08:57,880 --> 00:09:01,200
Oceania keyboard uncomplete listener right here right.

132
00:09:01,240 --> 00:09:03,130
So like this one and then press are interchangeable.

133
00:09:03,130 --> 00:09:06,200
So these codes are actually generated for you automatically.

134
00:09:06,220 --> 00:09:09,580
So let me create a new line so that you can see what's going on here.

135
00:09:11,220 --> 00:09:17,540
Let's create another new line here so you can see that first we said firebase ofat create use the read

136
00:09:17,610 --> 00:09:18,630
email and password.

137
00:09:18,630 --> 00:09:21,160
So we passed the use that email and the past for here.

138
00:09:21,360 --> 00:09:29,120
So we get these values from the Smurfette as an argument and we called this move it at uncomplete listener.

139
00:09:29,270 --> 00:09:31,060
And the result of this Smurfette.

140
00:09:31,110 --> 00:09:37,080
So whatever happens this is going to be caught at whatever happens when the user wants to sign up.

141
00:09:37,170 --> 00:09:39,490
These at uncompleted this and it is going to be called.

142
00:09:39,930 --> 00:09:45,420
And we have one Mefford uncomplete So if it is going to be called when ever it was actually for example

143
00:09:45,420 --> 00:09:52,860
successful or it was some kind of error that we can we can actually solve it or for example the users

144
00:09:53,440 --> 00:09:55,680
of internet connection is gone.

145
00:09:55,740 --> 00:09:56,490
Right.

146
00:09:56,640 --> 00:09:57,530
And we have.

147
00:09:57,630 --> 00:10:00,320
Let me let's put a semicolon here.

148
00:10:00,420 --> 00:10:03,330
At the end of this actually practice is here.

149
00:10:03,330 --> 00:10:06,060
Let's go inside this Meffert uncomplete right.

150
00:10:07,120 --> 00:10:09,410
This means that the task is actually completed.

151
00:10:09,560 --> 00:10:13,800
Whether it's was successful or it was actually for but it actually failed.

152
00:10:14,090 --> 00:10:15,090
So it is Smurfit.

153
00:10:15,100 --> 00:10:20,300
I can't say so first but let's check for the condition of actually failing.

154
00:10:20,320 --> 00:10:25,060
For example the user has actually failed to sign up to an application.

155
00:10:25,120 --> 00:10:30,630
In that case I want to show a message to the user that there wasn't a problem and the user can actually

156
00:10:30,640 --> 00:10:31,390
try again.

157
00:10:31,390 --> 00:10:34,160
So I can actually say.

158
00:10:34,190 --> 00:10:41,360
So it just I think he had enough banned or not this is actually the bank operator or the not operator

159
00:10:41,750 --> 00:10:51,600
task that is successful if the process of signing up to the application was not successful.

160
00:10:51,600 --> 00:10:57,110
So look at this bank operator here is not operator then in that case we can actually say just open and

161
00:10:57,110 --> 00:10:59,280
close this if statement by using these curly braces.

162
00:10:59,490 --> 00:11:04,700
You can't say toast that make you text first let's specify the context.

163
00:11:04,700 --> 00:11:10,130
Make sure to just type in main activity that is if you just type in here is that Michoud is here.

164
00:11:10,200 --> 00:11:17,340
If you're just typing here does this he refers to this anonymous in a class here that we actually created.

165
00:11:17,400 --> 00:11:18,990
So this is not correct.

166
00:11:18,990 --> 00:11:25,430
We want to actually refer to the context which is going to be main activity that is.

167
00:11:25,490 --> 00:11:26,630
OK come on.

168
00:11:26,850 --> 00:11:31,740
So the message is going to be that there wasn't a problem.

169
00:11:31,770 --> 00:11:32,370
Try again

170
00:11:35,150 --> 00:11:41,790
OK and come on now let's specify the duration of this message which is going to be length short and

171
00:11:41,790 --> 00:11:45,570
we can't call this method show this use Toast object.

172
00:11:45,570 --> 00:11:47,370
So let me create a new line here.

173
00:11:48,300 --> 00:11:49,500
So that's it.

174
00:11:49,500 --> 00:11:54,360
So now let's create an else statement so this is a statement here is going to be executed.

175
00:11:54,390 --> 00:12:00,240
If this condition he had face this was a statement he had means that the user has successfully signed

176
00:12:00,300 --> 00:12:01,700
up to our application.

177
00:12:01,740 --> 00:12:07,890
So in that case again I can actually create a post message so toast that major text.

178
00:12:07,890 --> 00:12:14,640
So now let's specify the context which is going to be main activity that this come up and the message

179
00:12:14,850 --> 00:12:17,110
here is going to be actually 6.

180
00:12:17,130 --> 00:12:27,830
You are successfully you are successfully signed up signed up to signed up.

181
00:12:27,850 --> 00:12:28,720
That's OK.

182
00:12:28,940 --> 00:12:38,590
And now I can actually specify the duration so come up I can say lenth short that show that we create

183
00:12:38,640 --> 00:12:40,480
a new fly here.

184
00:12:40,480 --> 00:12:41,580
So that's it.

185
00:12:41,600 --> 00:12:49,300
Now if they use it to successfully signed up to our application now we need to specify the user profile.

186
00:12:49,300 --> 00:12:55,450
So when the user actually is signed in the user can actually see the display the name the display name

187
00:12:55,900 --> 00:13:00,060
the image or any other for example values.

188
00:13:00,070 --> 00:13:06,250
So now after this toasts message we are going to call another method and that if it is going to be specified

189
00:13:06,400 --> 00:13:12,910
specified user profile lets put up in our practices here semicolon.

190
00:13:12,910 --> 00:13:14,790
So we have not created this method yet.

191
00:13:14,800 --> 00:13:15,340
Right.

192
00:13:15,400 --> 00:13:16,900
So let's scroll down here.

193
00:13:17,050 --> 00:13:23,770
And after the curly brace of the Smurfit and before the end and calibrates of this class let's create

194
00:13:23,800 --> 00:13:24,370
another method.

195
00:13:24,370 --> 00:13:30,150
So just like in here private void and the name of this is going to be specify a user profile.

196
00:13:30,310 --> 00:13:34,950
Just put a pair of parenthesis here and open and close this method by using these curly braces.

197
00:13:35,170 --> 00:13:36,720
So inside is curly braces.

198
00:13:36,730 --> 00:13:37,370
I can't say.

199
00:13:37,420 --> 00:13:38,570
So just typing here.

200
00:13:38,680 --> 00:13:44,680
Firebase user just referred to this one here firebase user and the name is going to be firebase user

201
00:13:45,010 --> 00:13:46,480
assignment operator.

202
00:13:46,720 --> 00:13:54,420
So now I can say firebase oath that gets instance that gets callant user.

203
00:13:54,430 --> 00:13:57,910
So first we need to get the current user firebase user of our application.

204
00:13:57,970 --> 00:13:58,500
Right.

205
00:13:58,810 --> 00:14:08,290
And then after this line of code I can say if firebase user is not equal to gnarl then I can open and

206
00:14:08,290 --> 00:14:10,770
close this statement by using these curly braces.

207
00:14:10,780 --> 00:14:16,770
So here I can actually say user profile change request so lets create a variable after you use a profile

208
00:14:16,770 --> 00:14:22,030
change change request and the name is going to be user profile change request assignment operator new

209
00:14:22,840 --> 00:14:27,870
user profile change request that builder here.

210
00:14:27,910 --> 00:14:34,780
So now let me create a new line here not to step in here at DOT and here you can see that we can specify

211
00:14:34,780 --> 00:14:38,600
the display name and the photo you are right.

212
00:14:38,680 --> 00:14:45,460
So first in this application we just want to specify the display name and just type in here said display

213
00:14:45,460 --> 00:14:45,860
name.

214
00:14:46,030 --> 00:14:51,430
So we are ready to get the display name from the EDT name right at the emulator.

215
00:14:51,430 --> 00:14:54,820
So here we the user enters the name right.

216
00:14:54,910 --> 00:14:58,980
So we are going to get the display name from this from the value of this text.

217
00:14:59,050 --> 00:15:00,660
So instead the apprentice's I can say.

218
00:15:00,670 --> 00:15:01,450
EDT.

219
00:15:01,460 --> 00:15:03,760
Name that get text.

220
00:15:03,840 --> 00:15:05,350
That too is strange.

221
00:15:05,890 --> 00:15:12,550
And then here finally we are going to actually call this method that pilt here.

222
00:15:12,550 --> 00:15:15,980
If you want to you can also specify the photo you are.

223
00:15:16,000 --> 00:15:19,980
I just step in here that said photo.

224
00:15:19,990 --> 00:15:26,190
You are right but for this application we just want to specify the display name because the later in

225
00:15:26,200 --> 00:15:28,450
the welcome screen and the other will welcome a screen.

226
00:15:28,450 --> 00:15:33,580
We are going to get the display name from the user and we're going to show it to the user.

227
00:15:33,640 --> 00:15:38,110
So just typing here just call this method that's built and semicolon.

228
00:15:38,110 --> 00:15:42,980
So after this line of code here let me create a new line here so that you can see what's going on.

229
00:15:43,480 --> 00:15:51,320
After this line of code I can refer to this firebase use that valuable that up date profile update profile.

230
00:15:51,550 --> 00:15:57,880
And here we need to pass this a variable of type if it does one user profile change requests or just

231
00:15:58,210 --> 00:16:06,730
past this user profile change request thought at uncomplete listener OK new and just hold the shift

232
00:16:06,730 --> 00:16:11,020
key on your keyboard and then press on the little Or key on your keyboard and then present it on your

233
00:16:11,020 --> 00:16:11,980
keyboard.

234
00:16:11,980 --> 00:16:17,110
So now let me create on your line and after it is the end in practice it's just put a semicolon and

235
00:16:17,110 --> 00:16:18,410
inside is accomplishment.

236
00:16:18,430 --> 00:16:27,810
Here we can say that we have this task here right and we can see if task that is successful we can open

237
00:16:27,810 --> 00:16:30,390
and close this statement by using the curly braces.

238
00:16:30,390 --> 00:16:35,670
Let's create an else statement for another condition that actually the task was not successful.

239
00:16:35,730 --> 00:16:43,890
So if we just show our message to the user here and that may create a comment here task was successful.

240
00:16:46,380 --> 00:16:54,130
OK and here inside is else black I can't say task was not successful.

241
00:16:54,280 --> 00:16:58,630
So later we're going to get the display name from the firebase user.

242
00:16:58,750 --> 00:17:03,490
But for now just look at this method here and just understand what's going on here.

243
00:17:03,490 --> 00:17:08,080
First we're getting the firebase user and we are checking that if the firebase use that is not known

244
00:17:08,350 --> 00:17:13,210
then we are going to actually say user profile change request and we are going to specify the display

245
00:17:13,210 --> 00:17:17,000
name the display name is going to be this one editing that takes the string.

246
00:17:17,080 --> 00:17:22,040
And finally we are going to call this method build and then we are going to say firebase use that update

247
00:17:22,050 --> 00:17:22,890
profile.

248
00:17:23,230 --> 00:17:26,740
And we say user profile change request that at uncomplete listener.

249
00:17:26,830 --> 00:17:28,530
So that's it this is our method.

250
00:17:28,660 --> 00:17:30,800
Now let's create another I'm afraid.

251
00:17:30,820 --> 00:17:34,240
In order to allow the user to sign in to our application.

252
00:17:34,440 --> 00:17:40,710
So again before the end in curly brace of this main activity class I'm going to create another method.

253
00:17:40,780 --> 00:17:47,500
So here just typing private void and the name of that effort is going to be signing the user signing

254
00:17:47,920 --> 00:17:53,270
the user with e-mailed and password.

255
00:17:53,320 --> 00:17:55,920
So let's specify some parameters for this method.

256
00:17:55,930 --> 00:17:59,930
The first one is going to be for the e-mail which is going to be a stream and the name is going to be

257
00:17:59,950 --> 00:18:00,760
e-mail.

258
00:18:01,060 --> 00:18:03,340
Use that e-mail actually use e-mail.

259
00:18:04,000 --> 00:18:04,570
Come on.

260
00:18:04,720 --> 00:18:10,420
And the second parameter is going to be a again of type strange and the name is going to be used a password

261
00:18:10,870 --> 00:18:13,680
user password.

262
00:18:13,700 --> 00:18:17,270
So let's open and close this method by using the curly braces here.

263
00:18:18,230 --> 00:18:27,870
Now inside the Smurfit I can say firebase oath firebase oath does signing a signing with email and password.

264
00:18:27,920 --> 00:18:30,920
So if you need to pass the email first so the email is here.

265
00:18:30,950 --> 00:18:39,500
Use an email comma and the password is going to be use a password dot at uncomplete listener at uncomplete

266
00:18:39,500 --> 00:18:41,100
listener.

267
00:18:41,330 --> 00:18:47,150
So here instead Apprentice's just a point here new and then here just hold down the shift key on your

268
00:18:47,150 --> 00:18:51,740
keyboard and then press on the little all key on your keyboard so that you can see this option.

269
00:18:51,740 --> 00:18:53,270
Uncomplete listen at here right.

270
00:18:53,300 --> 00:18:59,710
And then press on your keyboard so that Android studio puts out these codes here automatically for you.

271
00:18:59,750 --> 00:19:02,770
So lets put a semicolon here at the end of this prentices.

272
00:19:02,780 --> 00:19:05,520
Now let me create a new line here so that you can see what's going on here.

273
00:19:05,520 --> 00:19:11,360
First we actually referred to these firebase of instance and then be said that signing with email and

274
00:19:11,360 --> 00:19:11,940
passport.

275
00:19:11,950 --> 00:19:17,960
So if you passed these user email and this use a password that you receive as arguments from the Smurfette

276
00:19:18,290 --> 00:19:20,920
and we said that at uncomplete listener.

277
00:19:21,110 --> 00:19:25,190
So inside this uncle uncomplete my friend here we can actually to say.

278
00:19:25,280 --> 00:19:30,750
So you can see that we have this task object as an argument of these accomplis methods.

279
00:19:30,890 --> 00:19:38,870
Let's check for the condition that determines that the user has actually failed has been faked to sign

280
00:19:38,870 --> 00:19:40,170
into our application.

281
00:19:40,250 --> 00:19:51,140
So I can't say if not task object that is successful if the task of director is received is not successful

282
00:19:51,200 --> 00:19:55,790
here then this means that the user is paid to sign in to our application.

283
00:19:55,790 --> 00:20:01,750
So in that case we can actually show a message to the user in order to let him or her know that the

284
00:20:01,760 --> 00:20:04,190
signing process was not successful.

285
00:20:04,190 --> 00:20:08,810
So I can say that Mike takes the first minute to pass the context which is going to be main activity

286
00:20:08,810 --> 00:20:10,760
that does come up.

287
00:20:10,760 --> 00:20:12,490
And the message is going to be.

288
00:20:12,530 --> 00:20:14,200
For example there was an error.

289
00:20:14,660 --> 00:20:23,710
There was an error come up and then we can specify the duration then short data show data show.

290
00:20:23,720 --> 00:20:27,790
So let me create a new line here so that you can see what's going on here.

291
00:20:27,860 --> 00:20:29,930
Now we can create an else statement.

292
00:20:30,080 --> 00:20:36,860
So this Atlas Plug here determines that if the above condition this one is actually false This means

293
00:20:36,860 --> 00:20:40,760
that the user has successfully signed in to our application.

294
00:20:40,820 --> 00:20:46,330
In that case we want to transition to an all other activity so we don't have that activity yet.

295
00:20:46,400 --> 00:20:53,040
So let's actually put this courtsey of let's create an Internet object here into it and we can say well

296
00:20:53,040 --> 00:21:00,720
come intent will come intent assignment operator new intent.

297
00:21:00,730 --> 00:21:07,040
So first we need to pass the context which is going to be main activity that these come are.

298
00:21:07,410 --> 00:21:11,520
And now we need to pass the class or the activity that we want to transition to.

299
00:21:11,700 --> 00:21:17,220
So we want to transition to the Vellacott activity which we has not created yet so we can say well come

300
00:21:18,830 --> 00:21:21,290
that class color.

301
00:21:21,680 --> 00:21:26,090
So now say it's thought activity will come in.

302
00:21:27,220 --> 00:21:30,390
And finally we want to close the colorant activity.

303
00:21:30,430 --> 00:21:34,230
We want to eliminate the cult activity from their views.

304
00:21:34,690 --> 00:21:36,360
So we can say finish.

305
00:21:36,470 --> 00:21:42,740
So it when we call them if at finish the cult activity is going to be eliminated from the views.

306
00:21:43,090 --> 00:21:46,510
So now let's actually open our review here.

307
00:21:46,630 --> 00:21:51,350
So now we're going to create a new activity so just open this up for them open the door for her.

308
00:21:51,520 --> 00:21:53,600
So that now you can see this package right.

309
00:21:53,650 --> 00:21:55,880
Right click on this package new.

310
00:21:56,010 --> 00:22:03,820
And now let's click on this activity and let's go to these Actually it is empty activity and the activity.

311
00:22:04,120 --> 00:22:07,150
So the name of the activity is going to be wellcome.

312
00:22:07,840 --> 00:22:12,670
OK this is the name of the activity and it's going to generate a lay out a name or lay out file actually

313
00:22:12,670 --> 00:22:18,370
with this name activity on it like Wellcome and it's going to have a backwards compatibility make sure

314
00:22:18,370 --> 00:22:20,860
that this check box is not checked.

315
00:22:20,860 --> 00:22:24,240
Lots of activity this development if it is not going to be that lot of activity.

316
00:22:24,430 --> 00:22:26,530
A lot of activity is going to be the main activity.

317
00:22:26,530 --> 00:22:27,000
OK.

318
00:22:27,160 --> 00:22:28,240
And this is the package name.

319
00:22:28,300 --> 00:22:29,580
Let's get it unfinished.

320
00:22:29,860 --> 00:22:31,440
So let's wait a little bit here.

321
00:22:31,480 --> 00:22:31,880
OK.

322
00:22:31,930 --> 00:22:34,920
So now that they're welcome activity is created.

323
00:22:34,960 --> 00:22:38,500
Let's go to our actually at the welcome screen.

324
00:22:38,620 --> 00:22:44,170
Let's open our test folder here and let's open the layout folder and you can see that this activity

325
00:22:44,170 --> 00:22:46,480
underlined Welkom is actually created.

326
00:22:46,480 --> 00:22:47,810
This one is exemplified.

327
00:22:47,850 --> 00:22:49,610
Let's start because Handyside.

328
00:22:49,750 --> 00:22:57,490
So now let's try a text view into our constraint lay out here so here inside the pallet section you

329
00:22:57,490 --> 00:23:04,630
can see this takes you to distract the states here and put it under center here of this screen and you

330
00:23:04,630 --> 00:23:08,190
can see that are some constraints and actually created here.

331
00:23:08,320 --> 00:23:12,550
So selectees takes you first of all let me double click on the stop in order to make this area wider

332
00:23:12,900 --> 00:23:14,060
select is text view.

333
00:23:14,200 --> 00:23:16,990
Let's give an ID to this text.

334
00:23:17,020 --> 00:23:21,670
So the idea is going to be TXI the Wellcome and then person until Chanur keyboard.

335
00:23:21,670 --> 00:23:27,130
So now I think the position of this view is actually good if you want to you can actually change the

336
00:23:27,130 --> 00:23:28,870
position of the text view.

337
00:23:28,870 --> 00:23:32,020
Now let's try a button here into this.

338
00:23:32,040 --> 00:23:38,140
Lay out here and put it here so you can see that our constraint is actually created to the right of

339
00:23:38,140 --> 00:23:43,340
the screen and another constraint is actually created to the left here on the left edge of the screen.

340
00:23:43,630 --> 00:23:50,110
So now let's create a create a constraint to the bottom of this takes you let's create a constraint

341
00:23:50,110 --> 00:23:55,870
from the top edge of this button to the bottom of the state's view so you can see this little circle

342
00:23:55,870 --> 00:23:57,160
that is pulsating.

343
00:23:57,190 --> 00:24:02,200
So let's actually create this constraint here to the bottom of the state's view and let's change the

344
00:24:02,200 --> 00:24:06,580
top margin to 20 and then present until January 3rd.

345
00:24:06,610 --> 00:24:12,420
So now let's select the spot and let's keep an and it is button so the button is going to be between.

346
00:24:12,550 --> 00:24:17,140
Sign out and then press on until your keyboard.

347
00:24:17,140 --> 00:24:21,110
So now let's leave a text or text value to this button.

348
00:24:21,250 --> 00:24:22,690
So the text is going to be.

349
00:24:22,840 --> 00:24:27,310
So here you can see the states attribute the text is going to be sign out sign out

350
00:24:30,120 --> 00:24:31,530
from the from the

351
00:24:34,790 --> 00:24:36,870
and then press Enter key on your keyboard.

352
00:24:37,160 --> 00:24:38,630
So this is the text of this button.

353
00:24:38,630 --> 00:24:41,210
So let's go to our welcome activity class here.

354
00:24:41,420 --> 00:24:45,480
Inside this class let's declared an object a value of type takes few.

355
00:24:45,650 --> 00:24:51,800
So just they've been here a private text view private text view and their name is going to be the Wellcome

356
00:24:52,780 --> 00:24:53,850
semicolon.

357
00:24:54,260 --> 00:25:02,400
Private button and the name is going to be PETN who actually sign out and sign out semicolon.

358
00:25:02,540 --> 00:25:05,600
So let's go to our uncreate method here.

359
00:25:05,780 --> 00:25:10,980
And first let's initialize RTX the welcome here so we actually welcome an assignment operator and land

360
00:25:11,010 --> 00:25:18,400
at an inside Apprentice's just cast this object to a text view object find view by ID or dot ID DOT

361
00:25:18,400 --> 00:25:25,220
takes the welcome the XTi the come semicolon and then let's refer to our PTEN sign out.

362
00:25:25,220 --> 00:25:32,750
Assignment operator let's cast this object to our button object find view by ID or that ID that PTEN

363
00:25:32,900 --> 00:25:35,590
sign out semicolon.

364
00:25:36,020 --> 00:25:40,610
So now that we have actually initialized our objects here.

365
00:25:40,610 --> 00:25:47,210
So let's create a listener for this spot and so here I can say between sign out that sits on click listener

366
00:25:47,750 --> 00:25:52,610
knew and then hold the shift piano keyboard and then present the little Vicci on your keyboard.

367
00:25:52,660 --> 00:25:57,320
Select this option here uncle or cousin it and then person on your keyboard so that is going to create

368
00:25:57,320 --> 00:26:02,630
an anonymous in a class here and that anonymous in a class is going to actually implement this uncle

369
00:26:02,650 --> 00:26:03,990
class or interface.

370
00:26:04,010 --> 00:26:07,080
And then we have this uncle Mefford override it here.

371
00:26:07,100 --> 00:26:14,360
So now that we actually initialized objects and we actually created our listener for the Spartan.

372
00:26:14,450 --> 00:26:19,940
So let's go back to our main activity class here so you can see that we create has some if it's here

373
00:26:20,030 --> 00:26:24,270
and we haven't still called this method from anywhere inside this class.

374
00:26:24,380 --> 00:26:26,260
So we have this Smurfette here sign in.

375
00:26:26,310 --> 00:26:28,280
They use the read e-mail and password.

376
00:26:28,310 --> 00:26:34,760
We have this specify user profile so we called the Smurfette does specify user profile from the Smurfette

377
00:26:34,760 --> 00:26:36,910
from Sign-Up user with email and passport.

378
00:26:37,010 --> 00:26:41,610
But we haven't still called dismembered from anywhere inside our class.

379
00:26:41,900 --> 00:26:45,290
So let's scroll to the top here let's go into these uncreate Smurfette.

380
00:26:45,410 --> 00:26:47,790
So you can see that we have two buttons here right.

381
00:26:47,810 --> 00:26:51,100
We have this between signing and between Sign up.

382
00:26:51,140 --> 00:26:54,110
So let's create a listener for both of these buttons.

383
00:26:54,110 --> 00:26:57,670
First of all let's create a listener for the city and sign up button.

384
00:26:57,680 --> 00:27:06,330
So let's say BT and sign up that set and click listener new and then hold down the shift key on your

385
00:27:06,330 --> 00:27:08,700
keyboard and then press under the original keyboard.

386
00:27:08,700 --> 00:27:14,910
Select this option here so that so that the Android studio is going to actually write all the codes

387
00:27:15,000 --> 00:27:17,760
for you and the person in the Intel channel people.

388
00:27:18,030 --> 00:27:21,280
So now let's create a listener for their beauty and sign in.

389
00:27:21,300 --> 00:27:30,240
So just here between signing data sets uncooked listener new view that unclick listener so you can see

390
00:27:30,240 --> 00:27:30,690
that here.

391
00:27:30,720 --> 00:27:31,440
Right.

392
00:27:31,440 --> 00:27:35,240
So let's go into our Actually Betty and sign up that Satanical question.

393
00:27:35,250 --> 00:27:37,710
And inside is onco Smurfette here.

394
00:27:37,740 --> 00:27:43,230
First of all we need to get the e-mail we get the e-mail from the EDT e-mail and we get a passport from

395
00:27:43,230 --> 00:27:47,060
the EDT passport because we want to get these values from the user.

396
00:27:47,340 --> 00:27:50,180
So the input is going to be provided by the use of.

397
00:27:50,190 --> 00:27:56,010
So let's say let's create a local variable here inside this uncle Mayford strange and the name of this

398
00:27:56,010 --> 00:28:02,270
variable is going to be user user made like assignment operator.

399
00:28:02,440 --> 00:28:11,180
So now let's actually refer to our EDT email that just text that to strange semicolon.

400
00:28:11,440 --> 00:28:14,010
Now let's get the passports from the user again.

401
00:28:14,050 --> 00:28:20,080
Let's create a variable of type street the name of the variable is going to be user password assignment

402
00:28:20,080 --> 00:28:20,850
operator.

403
00:28:21,010 --> 00:28:23,380
And again EDT password.

404
00:28:23,720 --> 00:28:28,220
That's a text that stream semi-colon.

405
00:28:28,430 --> 00:28:34,880
So now that we have to use that email and they use a password here now we can actually call that sign

406
00:28:34,880 --> 00:28:39,110
up the users beep email and password Meffert that be created inside our class.

407
00:28:39,110 --> 00:28:45,740
So let's actually first of that method sign up sign up the user with email and password.

408
00:28:45,740 --> 00:28:46,460
Choose this one.

409
00:28:46,460 --> 00:28:48,740
Sign up users with email and password.

410
00:28:48,740 --> 00:28:50,760
Now if it needs to arguments.

411
00:28:50,770 --> 00:28:53,930
So let me call this Meffert again so that you can see those arguments.

412
00:28:54,350 --> 00:28:58,560
If the first argument is going to be use it and the second argument is going to be used that passport.

413
00:28:58,580 --> 00:29:06,880
So if you have to use an e-mail here and the use of Hallsworth here so this user e-mail Khama user password.

414
00:29:07,110 --> 00:29:07,680
Right.

415
00:29:07,800 --> 00:29:13,490
So now let's go to our Betty and sign in that certain click listen in my foot here and inside his uncle.

416
00:29:13,590 --> 00:29:16,190
Again we need to get the e-mail and the passport right.

417
00:29:16,200 --> 00:29:21,390
So let's copy these two lines of plot here inside this uncle of this PTEN sign up that said Uncle Clisson

418
00:29:21,480 --> 00:29:25,000
let's copy these two lines of code and let's paste it here.

419
00:29:25,380 --> 00:29:31,730
And now we can actually call this Smurfette signing the user with IIM-A and password.

420
00:29:31,920 --> 00:29:36,660
OK at this time let's call this method saying the user will email and password.

421
00:29:36,660 --> 00:29:42,810
So again we need to pass that use an e-mail comma and user password right.

422
00:29:42,840 --> 00:29:43,890
So that's it.

423
00:29:43,890 --> 00:29:54,420
So now that we actually provide some implementations for these two methods here we can run our application.

424
00:29:54,420 --> 00:29:57,630
So first let me let me open the web browser.

425
00:29:57,630 --> 00:30:02,880
So here it is my firebase console and you can see that I actually click on it clicked on often location

426
00:30:02,910 --> 00:30:05,920
and it says no users for this project yet.

427
00:30:06,150 --> 00:30:08,490
So let's go back to our Android studio.

428
00:30:08,580 --> 00:30:12,920
Let's run our application let's select one of these devices and then click on OK.

429
00:30:12,990 --> 00:30:16,220
So now you can see that our application is running on the simulator.

430
00:30:16,410 --> 00:30:18,420
So let's pro-white our name for the user.

431
00:30:18,420 --> 00:30:28,790
So the name of the use that is for example person person a right and let's provide an email here for

432
00:30:28,790 --> 00:30:40,200
example I can say person A at sign exampled dot com example that's come and here the password of the

433
00:30:40,200 --> 00:30:40,770
user.

434
00:30:40,800 --> 00:30:42,990
We can't say a b c d.

435
00:30:42,990 --> 00:30:50,220
One two three four five six seven eight right now if I click on signing now it says there was an error

436
00:30:50,310 --> 00:30:50,560
right.

437
00:30:50,580 --> 00:30:57,940
We cannot sign in because the user is not signed up to our application yet let's get he can sign up.

438
00:30:58,080 --> 00:31:01,170
Now it says you are successfully signed up.

439
00:31:01,170 --> 00:31:07,340
Now if I go back to our firebase consul here let's actually refresh this page here.

440
00:31:07,350 --> 00:31:13,550
Now you can see that this person here is actually created the identifier is this email.

441
00:31:13,770 --> 00:31:19,500
And you can see the date of the creation signed in here the signing date.

442
00:31:19,500 --> 00:31:21,090
And they use edu I.D..

443
00:31:21,270 --> 00:31:21,600
Right.

444
00:31:21,600 --> 00:31:24,570
This is actually a unique value for each user.

445
00:31:24,570 --> 00:31:25,330
So now let's.

446
00:31:25,330 --> 00:31:26,870
Let me show you the emulator.

447
00:31:26,940 --> 00:31:28,160
So now I want to sign in.

448
00:31:28,200 --> 00:31:29,300
Let's go to consignee.

449
00:31:29,370 --> 00:31:30,510
Let's wait a little bit here.

450
00:31:30,510 --> 00:31:34,420
Now it transitioned to this welcome activity here.

451
00:31:34,800 --> 00:31:39,870
And you can see that we have nothing in place of this text view and we have this button here sign up

452
00:31:39,870 --> 00:31:41,300
from the from the app.

453
00:31:41,340 --> 00:31:44,730
If I click on this one button here nothing happens.

454
00:31:44,730 --> 00:31:47,460
So let's go back to our Android studio here.

455
00:31:47,850 --> 00:31:49,710
And now let's go to our welcome activity.

456
00:31:49,710 --> 00:31:53,710
So here let's create an instance of type firebase.

457
00:31:53,730 --> 00:31:54,130
OK.

458
00:31:54,240 --> 00:32:01,400
So here inside this welcome class let's create a variable of type of firebase of firebase 0.

459
00:32:01,970 --> 00:32:05,310
And the name of this instance is going to be firebase over semicolon.

460
00:32:05,360 --> 00:32:11,360
Let's go into our uncreate method here and let's initialize initialize our firebase of so let's refer

461
00:32:11,360 --> 00:32:13,720
to these fires of assignment operator.

462
00:32:13,910 --> 00:32:18,080
And here I can say firebase of that get instance semi-colon.

463
00:32:18,110 --> 00:32:20,550
So now we have an instance of the fire.

464
00:32:20,620 --> 00:32:21,380
Right.

465
00:32:21,530 --> 00:32:23,490
So here let me show you that.

466
00:32:23,510 --> 00:32:25,320
Let me show the firebase concert here.

467
00:32:25,490 --> 00:32:28,880
Let me show you that if you want to I can actually delete this user here.

468
00:32:28,900 --> 00:32:35,090
I can just click on this ellipsis button and here I can click on delete account or disable account or

469
00:32:35,170 --> 00:32:36,380
reset passport.

470
00:32:36,740 --> 00:32:38,850
So let's go back to android studio.

471
00:32:39,020 --> 00:32:41,710
So here I want to check for that condition here.

472
00:32:41,750 --> 00:32:47,300
So now after this line of code after getting the instance of the firebase off I can say if Firebrace

473
00:32:47,310 --> 00:32:53,960
oaf that gets current user gets kind of user is equal to Gnarl.

474
00:32:54,030 --> 00:33:00,690
This means if the current user does not exist or if the current users account is actually deleted then

475
00:33:00,810 --> 00:33:04,460
I don't want the user to be inside this activity.

476
00:33:04,530 --> 00:33:06,560
I want to actually go back.

477
00:33:06,560 --> 00:33:14,820
I want the user to move to the main activity here first I can say to create an intent here so intent

478
00:33:15,920 --> 00:33:22,580
main activity intent may activity intent assignment operator.

479
00:33:22,640 --> 00:33:29,510
So here we can say new intent and then first we need to actually pass the context which is going to

480
00:33:29,510 --> 00:33:35,710
be a welcome that does come up and then we need to pass the class that we're going to transition to.

481
00:33:35,810 --> 00:33:43,940
So the class is going to be main activity that class main activity that class semi-colon.

482
00:33:43,940 --> 00:33:47,600
So now that we have this intent here I can see start activity.

483
00:33:47,610 --> 00:33:52,200
So now we need to pass the intent main activity intent.

484
00:33:52,220 --> 00:33:57,070
And finally I want to close this activity the current activity level comm activity.

485
00:33:57,080 --> 00:34:03,520
You want to eliminate the current activity from the view stacks so I can say finish.

486
00:34:03,650 --> 00:34:04,750
Right.

487
00:34:04,830 --> 00:34:12,200
So now after this if statement here I can create another if statement and I can't say enough firebase

488
00:34:12,210 --> 00:34:18,430
of that gets current user is not equal to knol.

489
00:34:18,960 --> 00:34:24,450
This means that actually our ease of use they're here inside that application and the kind of user is

490
00:34:24,450 --> 00:34:25,480
not equal to anon.

491
00:34:25,620 --> 00:34:28,440
That means that we have a user right.

492
00:34:28,470 --> 00:34:36,660
So now I can CTX TXI the Welkom that set text and I can put two coats here and on here I can say how

493
00:34:36,660 --> 00:34:37,640
are you.

494
00:34:37,980 --> 00:34:40,440
How are you comma space.

495
00:34:40,620 --> 00:34:43,530
Plus I use the concatenation operator here.

496
00:34:43,530 --> 00:34:51,230
Firebase oath that gets current user that gets this plaining that get display name.

497
00:34:51,390 --> 00:34:52,300
That's it.

498
00:34:52,300 --> 00:34:54,950
In this way we get that explaining from the user.

499
00:34:55,170 --> 00:35:00,950
So you may remember that we actually created MFX inside our main activity class here.

500
00:35:01,210 --> 00:35:03,700
And this is them efforts specify user profile.

501
00:35:03,720 --> 00:35:05,120
And here we are specified.

502
00:35:05,460 --> 00:35:09,780
They use their display name here right set to display name it its name but it takes that to strange

503
00:35:10,110 --> 00:35:10,630
right.

504
00:35:10,890 --> 00:35:16,650
So inside this Welkom class we are getting the display name from that value and we are sitting that

505
00:35:16,650 --> 00:35:18,510
this plane into this text the Wellcome.

506
00:35:18,570 --> 00:35:23,540
So now it's time to actually implement this Arncliffe method here of this city and sign out that said

507
00:35:23,540 --> 00:35:27,150
unclick the center first of all we want to sign out from the firebase.

508
00:35:27,150 --> 00:35:31,010
So I'm going to say firebase oath that sign out.

509
00:35:31,480 --> 00:35:31,900
OK.

510
00:35:32,010 --> 00:35:36,720
It's as simple as that by just calling the Smurfette on our Firebrace into instance we are going to

511
00:35:36,720 --> 00:35:40,500
sign we're going to get signed out from our Firebrace project.

512
00:35:40,770 --> 00:35:47,400
And here time to actually write the codes in order to let the USEF to go back to the main activity to

513
00:35:47,400 --> 00:35:49,150
the luggin page actually.

514
00:35:49,170 --> 00:35:55,170
So now we have actually already created these quotes here inside our statement let's copy these quotes

515
00:35:55,170 --> 00:35:57,070
here and let's paste them here inside.

516
00:35:57,070 --> 00:36:01,890
It's unclear if at and below this line of code first we created this intent and then we called this

517
00:36:01,890 --> 00:36:02,150
Meffert.

518
00:36:02,160 --> 00:36:04,160
And finally we called the finish of it.

519
00:36:04,170 --> 00:36:04,600
OK.

520
00:36:04,830 --> 00:36:07,620
So now let's run our application again.

521
00:36:07,650 --> 00:36:09,330
Let me show you the emulator.

522
00:36:09,390 --> 00:36:11,970
So here we have the name of the user.

523
00:36:11,970 --> 00:36:20,080
So for example the name of the use that is for example be e-mail that user is the person the person

524
00:36:21,850 --> 00:36:31,050
at sign example does come and the password of the user is for example 1 2 3 4 5 6 A B C D E F.

525
00:36:31,060 --> 00:36:31,500
OK.

526
00:36:31,810 --> 00:36:33,850
So now let's click on sign up.

527
00:36:33,850 --> 00:36:37,950
Now it's going to say you're successfully signed up to our application to the app.

528
00:36:38,050 --> 00:36:44,440
Now you can see this message if I go to our firebase console let's refresh this page here.

529
00:36:44,440 --> 00:36:48,070
So here you can see these are actually the image here.

530
00:36:48,100 --> 00:36:50,060
This is actually signed up successfully.

531
00:36:50,060 --> 00:36:51,610
Let's let me show you the emulator.

532
00:36:51,610 --> 00:36:53,360
So now let's sign in.

533
00:36:53,440 --> 00:36:54,890
Now it says how are you.

534
00:36:54,890 --> 00:36:58,430
Be and we have this button sign on from the app.

535
00:36:58,440 --> 00:37:01,950
If I click on it now we're going to get signed out from the app.

536
00:37:02,040 --> 00:37:03,260
Right.

537
00:37:03,270 --> 00:37:03,780
So that's it.

538
00:37:03,780 --> 00:37:09,120
If I go back to android studio we can add another functionality and extra functionality to this application.

539
00:37:09,120 --> 00:37:13,470
Let's go to our main activity class and let's go to our uncreate Smurfette here.

540
00:37:13,860 --> 00:37:21,810
So here after getting the instance this firebase of instance year we can actually say if firebase oaf

541
00:37:22,250 --> 00:37:25,810
that the current user is not equal to Gnarl.

542
00:37:25,920 --> 00:37:33,190
This means that a user already actually created an account and signed it signed into the firebase app.

543
00:37:33,540 --> 00:37:39,480
Then in that case we can actually just transition to the Welcome screen we can create and intent here

544
00:37:39,480 --> 00:37:44,490
intent Wellcome intent Welkom intent.

545
00:37:45,570 --> 00:37:49,860
As Simon approached your new intent and first we need to pass the context which is going to be main

546
00:37:49,860 --> 00:37:59,900
activity that this karma Welkom that class Wellcome thought class semicolon and then we can say start

547
00:37:59,930 --> 00:38:02,630
activity Welkom intent.

548
00:38:02,960 --> 00:38:09,020
And finally we can actually call this method finish so that that this view here is I mean I think it

549
00:38:09,020 --> 00:38:11,630
is going to be removed from their views.

550
00:38:11,840 --> 00:38:12,270
OK.

551
00:38:12,500 --> 00:38:14,540
So let's run the application now.

552
00:38:14,630 --> 00:38:15,940
Let me show you the emulator.

553
00:38:15,950 --> 00:38:16,850
Now we can see.

554
00:38:16,850 --> 00:38:23,400
So for example let's actually for example say name of the user is see the email of the use it is.

555
00:38:23,400 --> 00:38:30,320
See person C per cent as an example that's come and pass will of the use that is for example again one

556
00:38:30,320 --> 00:38:34,940
two three four five six seven eight is s the b c v.

557
00:38:35,120 --> 00:38:35,600
OK.

558
00:38:35,720 --> 00:38:37,100
Let's click on sign up.

559
00:38:37,100 --> 00:38:39,490
Now it says you are successfully signed up to the app.

560
00:38:39,500 --> 00:38:42,100
If I click on signing.

561
00:38:42,120 --> 00:38:44,650
OK so now you are signing into our application.

562
00:38:44,700 --> 00:38:49,660
So not is that we are still signed into our application and now you want to actually close this app.

563
00:38:49,700 --> 00:38:50,690
Ok close.

564
00:38:50,730 --> 00:38:54,610
So let's go back to android studio let's run the app again.

565
00:38:54,660 --> 00:39:01,200
Let me show you the emulator and now you're going to automatically signed up signed in to our firebase

566
00:39:01,200 --> 00:39:01,550
app.

567
00:39:01,590 --> 00:39:02,310
You can see that here.

568
00:39:02,310 --> 00:39:04,800
How do you see sign out from the app.

569
00:39:04,800 --> 00:39:06,060
That's it.

570
00:39:06,060 --> 00:39:11,050
So these are actually capabilities of the firebase backend.

571
00:39:11,550 --> 00:39:17,570
And if you want to if you want to add more features to your application make sure to actually firebase

572
00:39:17,590 --> 00:39:24,720
documentation or searching that stack overflow in order to solve the solution for your problems for

573
00:39:24,720 --> 00:39:26,110
your program problems.

574
00:39:26,280 --> 00:39:30,490
And then you will be able to actually create awesome applications.

575
00:39:30,630 --> 00:39:31,800
So that's it.

576
00:39:31,800 --> 00:39:35,790
If you have any questions please post the discussion in the course and then I do my best to answer all

577
00:39:35,790 --> 00:39:36,930
of your questions.

578
00:39:36,930 --> 00:39:39,700
Thank you very much for watching and I'll see you in the next tutorial.

