1
00:00:00,230 --> 00:00:01,070
Hi everyone.

2
00:00:01,140 --> 00:00:04,470
So now you're actually inside these mass activity class.

3
00:00:04,470 --> 00:00:08,930
So in this matter activity class we are going to actually declare a variable.

4
00:00:09,210 --> 00:00:11,670
So is this class distopian private.

5
00:00:12,030 --> 00:00:14,250
And at the top of this idea is strange.

6
00:00:14,520 --> 00:00:20,290
And the name of this variable is received received country right.

7
00:00:20,310 --> 00:00:21,140
Semicolon.

8
00:00:21,210 --> 00:00:25,670
So we are going to actually receive or get the country from the main activity class.

9
00:00:25,670 --> 00:00:26,120
Right.

10
00:00:26,400 --> 00:00:34,320
So now let's go to this other uncreate Smurfette here and after these lines of code here I'm going to

11
00:00:34,320 --> 00:00:36,680
actually put some codes here.

12
00:00:36,900 --> 00:00:41,680
But before that let's take a look at these codes here you can see that.

13
00:00:41,840 --> 00:00:42,570
Take a look at this.

14
00:00:42,570 --> 00:00:48,660
This comment here it says obtain the support map fragment and gets notified when the map is ready to

15
00:00:48,660 --> 00:00:49,230
be used.

16
00:00:49,290 --> 00:00:49,680
OK.

17
00:00:49,800 --> 00:00:55,110
So first it's going to actually get the support of a fragment here and it's going to find a fragment

18
00:00:55,200 --> 00:01:01,200
or that ID that map and it's going to actually call this if it gets map a seen it on this map fragment

19
00:01:01,200 --> 00:01:01,650
here.

20
00:01:01,650 --> 00:01:02,260
Right.

21
00:01:02,340 --> 00:01:08,040
So it is going to actually get them support my fragment and it's going to actually get notified when

22
00:01:08,040 --> 00:01:09,240
that map is ready.

23
00:01:09,240 --> 00:01:15,060
So before the map is ready all you want to get the country from the Minuteman activity you want to get

24
00:01:15,060 --> 00:01:19,410
to use the word that value that is actually passed to that intent.

25
00:01:19,410 --> 00:01:22,440
I want to get that value here before the map is ready.

26
00:01:22,680 --> 00:01:29,070
So after this line of code here that colors sits content to view it I can actually put my own logic

27
00:01:29,070 --> 00:01:29,700
here.

28
00:01:30,090 --> 00:01:31,180
Right.

29
00:01:31,220 --> 00:01:37,760
We need to access the intent that is actually used to send the data to this class.

30
00:01:38,070 --> 00:01:43,350
The intent that is used to transition to this class to this activity.

31
00:01:43,680 --> 00:01:52,730
So just in here intent and here know that the intent that is used to transition to this activity is

32
00:01:52,730 --> 00:01:53,710
the main activity.

33
00:01:53,810 --> 00:02:03,950
So I can just say main activity intent main activity intent assignment operator and I can just call

34
00:02:03,950 --> 00:02:07,280
this if it gets into that semicolon.

35
00:02:07,280 --> 00:02:13,010
That's it by just calling to decide if a good intent on an instance of type maps activities or not is

36
00:02:13,010 --> 00:02:16,520
that it is actually the this that's intent OK.

37
00:02:16,550 --> 00:02:18,260
Does that good intent.

38
00:02:18,290 --> 00:02:25,310
So by calling it an instance of type maps activity here we get the original intent that is used to transition

39
00:02:25,310 --> 00:02:31,570
to this activity here and we are assigning to these valuable here main activity intent.

40
00:02:31,580 --> 00:02:37,640
So now it's time to initialize or valuable that be declared in line number to anyone inside these maps

41
00:02:37,640 --> 00:02:38,660
activity class.

42
00:02:38,660 --> 00:02:42,780
So agency received country assignment operator.

43
00:02:42,980 --> 00:02:51,080
So now I can refer to this intent main activity intent that gets strange extra get something extra.

44
00:02:51,080 --> 00:02:56,630
And here I just need to pass the key in order to access the value that is passed to that intent.

45
00:02:56,810 --> 00:02:57,640
OK.

46
00:02:57,830 --> 00:03:02,240
Let's go back to this man with the glass to this maps activity engine here but just passing the key

47
00:03:02,240 --> 00:03:02,730
here.

48
00:03:02,830 --> 00:03:04,080
Are going to pass the value.

49
00:03:04,100 --> 00:03:11,090
So let's go back to my maps activity class and here we know that the key is let's refer to this country

50
00:03:11,090 --> 00:03:15,480
data source class that contradicts the semicolon.

51
00:03:15,590 --> 00:03:20,930
That's it by just referring to this key I can access the value and the value is going to be assigned

52
00:03:20,930 --> 00:03:23,120
to the received country valuable.

53
00:03:23,330 --> 00:03:25,730
And we know that the value is of type string.

54
00:03:25,730 --> 00:03:27,070
This is really important.

55
00:03:27,110 --> 00:03:28,980
So here there is a problem.

56
00:03:29,210 --> 00:03:37,660
What happens if they have value that is passed to this intent to this activity is actually not OK.

57
00:03:37,910 --> 00:03:42,380
So in that case we are going to actually have some problems.

58
00:03:42,400 --> 00:03:47,150
So in order to solve this problem after this line of code let's create an if statement and let's say

59
00:03:47,150 --> 00:03:54,970
if received country is equal to null then let's open and close this if statement by using these curly

60
00:03:54,980 --> 00:03:55,660
braces.

61
00:03:55,670 --> 00:04:00,780
In that case we are going to say that the received country is going to be there.

62
00:04:00,840 --> 00:04:08,270
Let's refer to this country data source class that default country name semi-hollow So the default country

63
00:04:08,270 --> 00:04:14,320
name is going to be assigned to the received country OK if the rest of the country is not.

64
00:04:14,660 --> 00:04:21,410
So now let's go through this on the map Reddam effort here and here you can see that you are accessing

65
00:04:21,410 --> 00:04:24,770
the Iceland by using these latitude and longitude.

66
00:04:24,890 --> 00:04:27,500
You create you're creating multiple options circle options.

67
00:04:27,500 --> 00:04:35,980
So we don't need to use these actually the calls here let's just delete all these codes here except

68
00:04:35,990 --> 00:04:39,730
this initialization of this map variable Google map.

69
00:04:40,040 --> 00:04:44,120
After this line of code now we're going to put some new logic's here.

70
00:04:44,300 --> 00:04:51,650
So here if you are going to use the geocoding capability and what is to according to geocoding is used

71
00:04:51,710 --> 00:04:56,830
to actually convert of value for example Canada or Canada.

72
00:04:57,040 --> 00:05:03,830
You are going to use a digital coding capability in order to access the latitude and longitude of Canada

73
00:05:03,870 --> 00:05:05,790
into the map.

74
00:05:05,990 --> 00:05:07,510
So that is called geocoding.

75
00:05:07,520 --> 00:05:16,840
But for now let's just create some for example valuables in order to hold the default latitude and longitude

76
00:05:16,850 --> 00:05:19,940
if they received country is actually not.

77
00:05:20,120 --> 00:05:22,760
So let's see what you're going to do next here.

78
00:05:22,760 --> 00:05:32,420
Let's create a variable of type double and the name of this variable is country latitude assignment

79
00:05:32,420 --> 00:05:39,920
operator and initially I'm going to assign the default latitude of the default country to this variable.

80
00:05:39,920 --> 00:05:45,620
So if you go to this country data source class you can see that the default country is Canada.

81
00:05:45,620 --> 00:05:46,380
Right.

82
00:05:46,850 --> 00:05:53,860
And here we specified the latitude and longitude of Canada here as the default country latitude and

83
00:05:53,860 --> 00:05:55,390
default country longitude.

84
00:05:55,430 --> 00:05:58,360
So let's go to these maps activity cles.

85
00:05:58,730 --> 00:06:00,360
So here I can defer.

86
00:06:00,410 --> 00:06:04,790
So initially I'm going to initialize this very well and ensure that I'm going to assign the default

87
00:06:04,790 --> 00:06:08,500
latitude the default country that is actually to this rally.

88
00:06:08,780 --> 00:06:16,350
So when I refer to this country that are sort of class that default country latitude semicolon.

89
00:06:16,760 --> 00:06:24,740
Let's create another variable of type double country longitude assignment operator and just refer to

90
00:06:24,740 --> 00:06:33,280
this country data source class country data source as it is with capital C country data source.

91
00:06:33,280 --> 00:06:37,380
Otherwise the autocomplete feature of Andrew sudi isn't going to help us.

92
00:06:37,480 --> 00:06:44,560
So we must use the capital C in order to access the country that source class that default country longitude

93
00:06:44,730 --> 00:06:45,670
semicolon.

94
00:06:45,970 --> 00:06:52,900
So here let's create a variable of type country data source so I can say country data source and the

95
00:06:52,900 --> 00:06:55,650
name is country data source assignment operator.

96
00:06:55,900 --> 00:06:59,280
So let's go to our main activity class and here let me scroll to the top.

97
00:06:59,330 --> 00:07:05,920
You can see that I created a static variable of type country datasource inside this class and inside

98
00:07:05,920 --> 00:07:11,380
the uncreate in fact I initialized this variable by using this hash table by the above right by using

99
00:07:11,380 --> 00:07:16,780
these countries and messages which is a hash table and I passed this hash table valuable to the constructor

100
00:07:17,170 --> 00:07:22,720
of this class so it is going to construct a new instance of type data source class and it's going to

101
00:07:22,720 --> 00:07:25,330
assign to this valuable country data source.

102
00:07:25,390 --> 00:07:32,290
So we already specified by the U.S. and Canada France Brazil United States Japan.

103
00:07:32,650 --> 00:07:37,120
So we can actually use this instance that we created in say this class.

104
00:07:37,120 --> 00:07:38,550
Let's go back to my maps activity.

105
00:07:38,540 --> 00:07:42,620
So first let me show you that it is actually a static variable.

106
00:07:42,670 --> 00:07:46,350
It is a class variable by just referring to the main activity class.

107
00:07:46,370 --> 00:07:52,650
I can direct the access this country data source instance without creating a new instance of the main

108
00:07:52,660 --> 00:07:53,380
activity.

109
00:07:53,680 --> 00:08:00,610
So let's go back to my maps activity class and I can just refer to this main activity main activity

110
00:08:02,850 --> 00:08:06,620
that country data source semicon and that's it.

111
00:08:06,720 --> 00:08:12,210
And now we initialized this roudy table by just accessing the country data source for instance that

112
00:08:12,210 --> 00:08:14,380
we have inside this main activity class.

113
00:08:14,730 --> 00:08:20,690
So here let's actually create a variable of type stream.

114
00:08:20,700 --> 00:08:28,320
So just in here is strange and the name of this valuable it's going to be country message assignment

115
00:08:28,320 --> 00:08:37,650
operator and now I'm going to refer to this country data source country data source that gets the info

116
00:08:37,680 --> 00:08:40,080
of the country get the info of the country.

117
00:08:40,080 --> 00:08:46,830
So here I just need to pass the country in order to get the value or the message or the info of that

118
00:08:46,830 --> 00:08:47,430
country.

119
00:08:47,550 --> 00:08:53,280
So if I go to this main activity class here you can see that V is specified for for example the country

120
00:08:53,310 --> 00:08:57,750
as the key and the message or the info as the value.

121
00:08:57,780 --> 00:09:02,800
So let's go back to country data source class here at the bottom of the file we created.

122
00:09:02,810 --> 00:09:03,600
I'm afraid you're right.

123
00:09:03,600 --> 00:09:08,910
Get the info out of the country and hear this if it accepts an argument of type string.

124
00:09:09,120 --> 00:09:13,700
So here we are returning this value.

125
00:09:13,770 --> 00:09:17,170
You are referring to this hash table value but that gets country.

126
00:09:17,220 --> 00:09:22,480
So if I pass the country the key you're going to get the value right.

127
00:09:22,520 --> 00:09:23,400
Good country.

128
00:09:23,400 --> 00:09:29,080
This means that past that key an access the value of this has been actually valuable.

129
00:09:29,130 --> 00:09:32,400
So let's go back to main maps activity class and here.

130
00:09:32,430 --> 00:09:37,820
When I say get the info of the country here we just need to pass the key which is going to be the country.

131
00:09:37,820 --> 00:09:43,840
So we have already actually a variable that is called received country.

132
00:09:43,860 --> 00:09:51,320
We actually get this value from the main activity and we are passing this as the key to this effort

133
00:09:51,690 --> 00:09:57,990
and it's going to give us the message devalue and we're going to assign that value to this country message.

134
00:09:57,990 --> 00:09:58,610
Right.

135
00:09:59,040 --> 00:10:03,610
So now it's time to start the geocoding process.

136
00:10:03,660 --> 00:10:07,220
So first of all we need to create an instance of type geocoder.

137
00:10:07,410 --> 00:10:14,140
So just step in here geocoder and the name is going to be geocoder assignment operator new geocoder.

138
00:10:14,270 --> 00:10:14,930
Right.

139
00:10:14,930 --> 00:10:20,720
So here we just need to pass the context which is going to be maps activity that this maps activity

140
00:10:20,750 --> 00:10:22,470
that this semicolon.

141
00:10:22,670 --> 00:10:29,220
So first let me tell you that at any point in the accordion process something can go wrong.

142
00:10:29,330 --> 00:10:29,750
OK.

143
00:10:29,840 --> 00:10:38,090
So we must put our logic into the try catch block in order to capture the exceptions that we may have

144
00:10:38,930 --> 00:10:43,210
in their geocoding process so let's just open here to try.

145
00:10:43,220 --> 00:10:48,920
So we have this triple check and after the I think the price of this Troy block I can't say catch on

146
00:10:49,030 --> 00:10:49,520
here.

147
00:10:49,550 --> 00:10:51,670
Let's use the exception.

148
00:10:51,730 --> 00:10:56,420
I e this open and closed this catch by using curly braces.

149
00:10:57,740 --> 00:11:04,610
So not is that this Iowa exception is a subclass of exception and we can use it in order to actually

150
00:11:04,620 --> 00:11:11,690
capture capture the errors and the exceptions that that may occur inside our project.

151
00:11:11,690 --> 00:11:14,080
So let's go inside is Charlie Black here.

152
00:11:14,090 --> 00:11:20,240
So here first we need to access the address of the country as a string value so that we can actually

153
00:11:20,240 --> 00:11:25,730
start geocoding by using that address and we can convert that string value to the latitude and longitude

154
00:11:25,730 --> 00:11:27,440
of that country name.

155
00:11:27,620 --> 00:11:33,380
So first I need to create a value of type strange and the name of this variable is going to be country

156
00:11:33,620 --> 00:11:37,370
address assignment operator.

157
00:11:37,550 --> 00:11:46,380
And here let's referred to two up valuable that we created inside our class called received country.

158
00:11:46,400 --> 00:11:53,780
So not is that this valuable this value is actually received from the main activity by using the speech

159
00:11:53,780 --> 00:11:54,960
recognition framework.

160
00:11:54,980 --> 00:11:56,380
But using the voice intent.

161
00:11:56,630 --> 00:11:58,480
So that's why it is called received country.

162
00:11:58,490 --> 00:12:03,310
So here it is going to be the address we assign it to this valuable country address.

163
00:12:03,470 --> 00:12:12,320
After this line of code let's create a list of country addresses so I can say list at inside the angle

164
00:12:12,320 --> 00:12:17,160
brackets we need to specify the data type of the objects that we're going to have inside this list.

165
00:12:17,330 --> 00:12:19,850
So it is going to be of type address.

166
00:12:19,940 --> 00:12:25,580
So we already have a class called address in Android that location package.

167
00:12:25,820 --> 00:12:29,190
Let me show you the and the documentation first.

168
00:12:29,210 --> 00:12:32,300
So here it is the android documentation inside the search bar.

169
00:12:32,300 --> 00:12:34,190
Let's search for address.

170
00:12:34,190 --> 00:12:38,780
So here you can see and with that location that address let's click on it and here you can see that

171
00:12:38,780 --> 00:12:44,700
it is actually a class that extends the object class and implements the parsable interface.

172
00:12:44,930 --> 00:12:51,860
So take a look at this description it says a class representing an address or a set of strings describing

173
00:12:51,890 --> 00:12:57,970
a location the address format is a simplified version of X..

174
00:12:58,220 --> 00:13:04,040
So don't about these values here for not just take a look at this summit here and this address locale

175
00:13:04,040 --> 00:13:11,720
constructs and and address object object set to the given locale and with all other fields initialized

176
00:13:11,780 --> 00:13:13,370
to not or false.

177
00:13:13,460 --> 00:13:18,050
We have this clear latitude removes any latitude associated with this address.

178
00:13:18,080 --> 00:13:24,130
You can actually take take a look at this or if it's here for example get at me an area get address

179
00:13:24,140 --> 00:13:30,280
line we can get the country name get through us and all these benefits here.

180
00:13:30,320 --> 00:13:31,050
Right.

181
00:13:31,070 --> 00:13:38,330
So don't worry just let's go back to android studio and now that we have this address class here let's

182
00:13:38,330 --> 00:13:45,800
name this valuable as country atlases country addresses assignment operator.

183
00:13:45,920 --> 00:13:55,190
So let's leave first to the still code for instance geocoder that gets from location name here so you

184
00:13:55,190 --> 00:13:58,270
can see that we have two versions of this for it through this movie.

185
00:13:58,280 --> 00:14:00,710
Again we have two versions of this.

186
00:14:00,710 --> 00:14:05,480
The first one accepts through argument and the second version accepts some more arguments for example

187
00:14:05,810 --> 00:14:13,160
and I accept that the name the max resolves the lower left latitude longitude with the upper right attitude

188
00:14:13,190 --> 00:14:14,990
and the upper right longitude.

189
00:14:14,990 --> 00:14:20,780
So if you're going to use the first version that actually only accepts two arguments location name and

190
00:14:20,780 --> 00:14:22,220
the max resorts.

191
00:14:22,280 --> 00:14:26,960
So we know what is the location and the location name is the country atomists just referred to this

192
00:14:27,440 --> 00:14:29,450
instance to this valuable country address.

193
00:14:29,450 --> 00:14:30,000
Come on.

194
00:14:30,170 --> 00:14:33,130
And the message is always going to be 10 semicolon.

195
00:14:33,380 --> 00:14:38,980
So it's going to give us 10 results maximum by using this country address.

196
00:14:39,020 --> 00:14:48,980
So here let's create an if statement so if country addresses country addresses is not equal to null

197
00:14:49,450 --> 00:14:50,050
here.

198
00:14:50,090 --> 00:14:56,630
We need to actually check for this condition here and only in that case we can assign some real values

199
00:14:57,020 --> 00:15:00,070
to these valuable country and country longitude.

200
00:15:00,290 --> 00:15:08,120
So instead this if statement I can refer to this country land latitude country latitude assignment operator

201
00:15:08,420 --> 00:15:15,080
so insight is least we have values of plate address right country addresses.

202
00:15:15,350 --> 00:15:19,490
So we said that we are going to have 10 maximum results.

203
00:15:19,490 --> 00:15:25,760
So let me tell you that the first result is going to be that the actually the precise one the most precise

204
00:15:26,030 --> 00:15:29,490
address that we can get from this list here.

205
00:15:29,510 --> 00:15:34,400
So I can refer to this country address's country addresses.

206
00:15:34,400 --> 00:15:41,540
So in order to access the first value that we have in say the least I need to call this method get and

207
00:15:41,540 --> 00:15:46,480
here I just need to pass the index which is going to be zero that gets latitude.

208
00:15:46,760 --> 00:15:52,400
So here we are calling to get latitude Meffert on the first object that we have in say the least which

209
00:15:52,400 --> 00:15:56,940
is if they address it right you are calling this method on this object that you have inside this list

210
00:15:57,200 --> 00:15:58,580
and it is the first object.

211
00:15:58,580 --> 00:16:03,740
And I told you that the first one the first object that we have in say this this is going to be the

212
00:16:03,740 --> 00:16:05,170
precise spot.

213
00:16:05,210 --> 00:16:08,630
So actually the most precise one not the precise one.

214
00:16:08,630 --> 00:16:15,680
So now let's put a semicolon at the end of our statement and let's refer to our country a lot longitude

215
00:16:15,880 --> 00:16:19,050
variable country longitude.

216
00:16:19,160 --> 00:16:24,800
So here we created this rally about in line number six the inside are on my ready Meffert assignment

217
00:16:24,800 --> 00:16:25,800
operator.

218
00:16:25,820 --> 00:16:35,670
So again let's refer to this country address's list that gets 0 that gets longitude semi-colon.

219
00:16:35,870 --> 00:16:40,630
So now what happens if the country addresses is actually not.

220
00:16:40,730 --> 00:16:42,550
We need to check for that condition too.

221
00:16:42,650 --> 00:16:48,560
So after this if if statement after the end in Kerley price of this statement let's create an else statement

222
00:16:48,650 --> 00:16:49,750
else here.

223
00:16:49,760 --> 00:16:58,450
We are going to say received country is going to be contrie datasource that default constraining semicolon.

224
00:16:58,760 --> 00:17:04,490
So if the country adolescent's is actually not we we don't have any country here we don't have any real

225
00:17:04,490 --> 00:17:05,020
country.

226
00:17:05,030 --> 00:17:09,920
So if you are going to specify the default country that is specified inside this class country at source

227
00:17:10,340 --> 00:17:15,820
as the country that we have here inside is received act received country rowdier.

228
00:17:15,930 --> 00:17:23,750
OK so now we also have this church block so that you know that this cataplexy is created to catch the

229
00:17:23,750 --> 00:17:27,620
exceptions that may occur in a a joke boarding process.

230
00:17:27,620 --> 00:17:30,120
So look at this line of thought here in line number 70.

231
00:17:30,380 --> 00:17:35,460
We are calling this method to get from location name on this geocoder instance.

232
00:17:35,510 --> 00:17:40,100
So it's going to start geocoding he is going to start the recording process.

233
00:17:40,100 --> 00:17:43,150
So some teens at some point can go wrong.

234
00:17:43,240 --> 00:17:43,830
OK.

235
00:17:43,850 --> 00:17:46,880
So in that case you're going to catch that error.

236
00:17:46,880 --> 00:17:55,520
So in this catch block we're going to say received country assignment operator country datasource that

237
00:17:55,760 --> 00:17:56,760
default country name.

238
00:17:56,780 --> 00:18:03,560
So if anything goes wrong in the recording process are going to specify the default country name as

239
00:18:03,560 --> 00:18:04,850
the received country.

240
00:18:04,850 --> 00:18:07,990
Here we are going to assign this value to the rest of the country.

241
00:18:08,060 --> 00:18:08,500
Right.

242
00:18:08,540 --> 00:18:14,610
So now after this catch block and after the ending curly brace of this catch block and before the end

243
00:18:14,630 --> 00:18:21,590
in place of this method of this on my Prady method here let's put some more logic here.

244
00:18:21,590 --> 00:18:27,200
So first let me tell you that now that we actually that we are actually using these data that we are

245
00:18:27,410 --> 00:18:32,450
for example accessing the received received country we are getting the country message here and we are

246
00:18:32,450 --> 00:18:37,880
starting to geocoding process after all these codes and after the geocoding process.

247
00:18:37,880 --> 00:18:42,920
Now it's time to modify the map itself.

248
00:18:43,220 --> 00:18:48,890
So here before the ading curly brace of the Smurfette I can't say.

249
00:18:49,310 --> 00:18:57,110
So let's create of the of type lot land and the name of this variable is going to be my country my country

250
00:18:57,110 --> 00:19:06,110
location assignment operator new law land survey to pass through arguments to the constructor.

251
00:19:06,110 --> 00:19:08,870
First we need to specify the latitude and longitude.

252
00:19:08,900 --> 00:19:14,210
So we created these two variables inside this class right country latitude and country longitude.

253
00:19:14,360 --> 00:19:15,710
So let's pass them here.

254
00:19:15,930 --> 00:19:19,610
Country latitude comma country longitude semi-colon.

255
00:19:20,000 --> 00:19:26,060
And here let's create a variable of type camera update and the name of this variable is camera update

256
00:19:26,600 --> 00:19:30,300
assignment operator Chamula update factory.

257
00:19:30,430 --> 00:19:32,440
That's Neil.

258
00:19:32,500 --> 00:19:34,150
Zoom here.

259
00:19:34,300 --> 00:19:37,480
So so he had a very 2:02 arguments to this method.

260
00:19:37,490 --> 00:19:40,940
First we need to pass an object of type let's land.

261
00:19:41,190 --> 00:19:43,250
And let me show you this method again.

262
00:19:43,400 --> 00:19:51,390
And the second argument is going to be the preciseness I should keep the zooming value that we need

263
00:19:51,420 --> 00:19:52,320
that you want to have.

264
00:19:52,410 --> 00:19:58,520
Is zooming out or this woman out for example if you passed 17 that is going to be the zooming value

265
00:19:58,520 --> 00:20:00,740
that you want to use on this location.

266
00:20:00,980 --> 00:20:02,900
So you are already familiar with that by the way.

267
00:20:02,900 --> 00:20:09,050
So first let's pass the last line Optik is it is going to be my country location comma and the zoomie

268
00:20:09,050 --> 00:20:12,290
radio is going to be seventeen point two.

269
00:20:12,460 --> 00:20:18,190
You can't use whatever value you want but I just I just prefer disvalue seventeen point two.

270
00:20:18,650 --> 00:20:21,740
Let me create a new line so that you can see what's going on here.

271
00:20:21,740 --> 00:20:28,910
So now we need to call this method that's actually fair to our map for instance valuable thoughts move

272
00:20:28,910 --> 00:20:30,260
camera.

273
00:20:30,440 --> 00:20:34,210
And I just need to pass this camera update to the Smurfit.

274
00:20:34,370 --> 00:20:34,950
Right.

275
00:20:35,210 --> 00:20:38,670
And now it's time to create a marker on this location.

276
00:20:38,670 --> 00:20:41,310
So just they've been here monitored options multiple options.

277
00:20:41,320 --> 00:20:48,120
Assignment operator new monitor options semicolon First we need to specify the position of this market

278
00:20:48,120 --> 00:20:48,460
option.

279
00:20:48,470 --> 00:20:50,820
So market options that position.

280
00:20:51,200 --> 00:20:53,940
So the position is going to be of type.

281
00:20:53,980 --> 00:20:55,130
And we know that here.

282
00:20:55,140 --> 00:20:58,370
So we actually already created a variable of type last thing.

283
00:20:58,490 --> 00:21:04,570
So I can pass that here in my country location semi-colon and let's specify the title of this market.

284
00:21:04,580 --> 00:21:08,380
So I can say multiple options that title.

285
00:21:08,420 --> 00:21:14,990
So we already created a value bet that is can be used for the title.

286
00:21:15,020 --> 00:21:20,570
So it is actually the country message here right by referring to the contrary message that we can actually

287
00:21:20,630 --> 00:21:24,930
access the intent that the info or the message of that country.

288
00:21:25,130 --> 00:21:30,420
So let's pass that here the title country message semicolon.

289
00:21:30,700 --> 00:21:35,570
And here we can also specify that snippet.

290
00:21:35,570 --> 00:21:38,640
So just typing here eruptions that snippets.

291
00:21:38,810 --> 00:21:41,700
So let's go to our country data source class here.

292
00:21:41,720 --> 00:21:45,740
If you scroll to the top here you can see that we have this default message here.

293
00:21:45,980 --> 00:21:50,760
So let's change this value to be happy for example.

294
00:21:50,830 --> 00:21:53,600
So let's go back to our map activity here.

295
00:21:53,720 --> 00:22:02,130
And now I can refer to this constant here so I can't say Country data source that default message semicolon.

296
00:22:02,390 --> 00:22:06,440
Now let's refer to a map instance valuable.

297
00:22:06,630 --> 00:22:10,320
That's at marker.

298
00:22:10,670 --> 00:22:13,740
So we have these small options here semicolon.

299
00:22:13,940 --> 00:22:16,340
So it's going to actually add this much to our map.

300
00:22:16,340 --> 00:22:23,000
So finally let's create a value of type circle options circle options circle options assignment operator

301
00:22:23,000 --> 00:22:25,950
new circle options semicolon.

302
00:22:26,090 --> 00:22:29,160
Say circle options that center.

303
00:22:29,590 --> 00:22:35,410
So we need to pass a value of type last line and it is going to be my country location semicolon and

304
00:22:35,420 --> 00:22:37,640
now we need to specify the radius.

305
00:22:37,760 --> 00:22:42,400
So I can say circle options that radius.

306
00:22:42,420 --> 00:22:53,020
So now I can say a 400 semicolon circle options thought stroke with stroke which I can pass a value

307
00:22:53,020 --> 00:22:53,650
of that float.

308
00:22:53,650 --> 00:22:57,200
Fourteen point five if semi-colon.

309
00:22:57,400 --> 00:23:02,380
And finally let's specify that scroll through each color circle options.

310
00:23:03,290 --> 00:23:06,480
That's true color color.

311
00:23:07,910 --> 00:23:09,330
Dots here.

312
00:23:09,350 --> 00:23:12,410
I can actually use on any nice semi-colon.

313
00:23:12,420 --> 00:23:19,980
And finally let's add let's add this sort of co-option to our map so map that at circle circle options

314
00:23:21,100 --> 00:23:23,220
certain call that's it.

315
00:23:23,220 --> 00:23:26,140
So I think now it's time to run the application.

316
00:23:26,140 --> 00:23:29,550
So let's run it and let's see what happens.

317
00:23:29,640 --> 00:23:31,300
Let me show you the emulator.

318
00:23:31,440 --> 00:23:34,280
So here you can see that our application is running on the simulator.

319
00:23:34,290 --> 00:23:41,970
But again the emulator does not fully support the speech recognition framework so you need to actually

320
00:23:42,330 --> 00:23:44,430
test this app on your actual device.

321
00:23:44,580 --> 00:23:48,930
So I'm going to take this up on my actual device and I'm going to record my screen device and then I'm

322
00:23:48,930 --> 00:23:51,260
going to show you what's going on here.

323
00:23:51,270 --> 00:23:57,450
So I tested the app on my android actual device and here first let me tell you that make sure that you

324
00:23:57,450 --> 00:23:59,650
have an Internet connection on your device.

325
00:23:59,790 --> 00:24:03,620
And as you can see my wife is actually turned on here.

326
00:24:03,780 --> 00:24:08,640
So let's let me actually play the video and then let me show you how it went.

327
00:24:08,640 --> 00:24:09,830
Let's play.

328
00:24:10,050 --> 00:24:18,300
So here I said Japan and here it actually opened the map activity so I zoomed out a little bit in order

329
00:24:18,300 --> 00:24:20,500
to show you this marker here.

330
00:24:21,920 --> 00:24:28,880
And you can see this little circle and if I actually zoom out in order to show you the Japan country

331
00:24:29,150 --> 00:24:33,850
here and here if I zoom in again now you can see this molecule option.

332
00:24:33,860 --> 00:24:40,490
This little circle and now I'm going to actually touch this mulcher and it says Welcome to Japan happy

333
00:24:40,500 --> 00:24:42,830
visiting be happy.

334
00:24:42,830 --> 00:24:43,590
Right.

335
00:24:43,610 --> 00:24:44,530
So that's it.

336
00:24:44,690 --> 00:24:47,530
OK everyone AB 79 is now finished.

337
00:24:47,540 --> 00:24:52,760
If you want to you can actually add more functionality to this application and you can actually make

338
00:24:52,940 --> 00:24:58,220
up your own and upload it to the Google Play store and in fact I recommend you to do that and make sure

339
00:24:58,370 --> 00:25:04,580
to actually share the link of your application in Google Play store with other students and beat me

340
00:25:05,060 --> 00:25:11,760
so that we can actually just give you some suggestions in order to make it better.

341
00:25:11,810 --> 00:25:13,610
So thank you very much for watching.

342
00:25:13,610 --> 00:25:18,820
The next app is going to be an e-commerce app so I'll see you in the next tutorial.

