1
00:00:00,440 --> 00:00:01,450
Hi everyone.

2
00:00:01,590 --> 00:00:08,460
So in this story are we going to create a new activity called my math activity in order to show the

3
00:00:08,460 --> 00:00:10,070
maps to the user.

4
00:00:10,080 --> 00:00:15,990
So here let's open the Android view and just opened the Java folder here you can see this package right

5
00:00:15,990 --> 00:00:21,010
click on it and new and then click on here and see this activity here right.

6
00:00:21,060 --> 00:00:21,680
Open it.

7
00:00:21,780 --> 00:00:25,230
And here you can see this gallery right click on it.

8
00:00:25,230 --> 00:00:30,780
So now here we can choose Google Maps activity click on next.

9
00:00:30,810 --> 00:00:36,590
So here you can see that the activity name is maps activity layouts name is activity Underland maps

10
00:00:36,590 --> 00:00:41,110
so the default name is actually we don't have to change this name to any other names.

11
00:00:41,120 --> 00:00:45,630
But if you want to we can change this activity name to any other name that you want and you can see

12
00:00:45,630 --> 00:00:46,850
that the title is map.

13
00:00:46,860 --> 00:00:48,660
So here it is a lantern activity.

14
00:00:48,660 --> 00:00:54,640
Let's check this check box here that says larger activity because I want this activity to be a lot of

15
00:00:54,640 --> 00:01:00,310
activity and we can see this hierarchical parent and you have this packaging.

16
00:01:00,510 --> 00:01:02,790
So just click on finish here.

17
00:01:02,790 --> 00:01:05,690
So it's going to create the maps activity for us.

18
00:01:05,700 --> 00:01:09,660
So let's all wait a little bit here and see that it is cradle built is running.

19
00:01:09,660 --> 00:01:11,190
So let's wait.

20
00:01:11,190 --> 00:01:17,820
So the actually activity is created for us and by default this XML file is opened.

21
00:01:17,850 --> 00:01:23,580
You can see that this ex-MIL file is inside the service folder and inside its values folder we have

22
00:01:23,640 --> 00:01:26,730
this example Fido's created for us automatically.

23
00:01:26,820 --> 00:01:30,270
Google underline maps underline API that examen.

24
00:01:30,570 --> 00:01:32,690
So here we can see that we have some description.

25
00:01:32,700 --> 00:01:34,200
So let me double click and start here.

26
00:01:34,200 --> 00:01:38,820
In order to make this area wider it's as before you run your application.

27
00:01:38,820 --> 00:01:42,340
You need a Google Maps API key to get one.

28
00:01:42,390 --> 00:01:43,350
Follow this link.

29
00:01:43,350 --> 00:01:45,350
Follow the directions and press create.

30
00:01:45,390 --> 00:01:46,170
At the end.

31
00:01:46,410 --> 00:01:49,600
So let's copy this link here that you can see here right.

32
00:01:49,610 --> 00:01:56,680
That's copy this one and let's open their web browser and let's paste this actually link here.

33
00:01:56,760 --> 00:01:59,880
Instead it says to put the person into the journal keyboard.

34
00:01:59,880 --> 00:02:01,720
So let's wait a little bit here.

35
00:02:02,750 --> 00:02:04,060
So now it says sign it.

36
00:02:04,070 --> 00:02:06,850
You need to sign in to our Google account here.

37
00:02:07,070 --> 00:02:07,990
So first we need to.

38
00:02:08,030 --> 00:02:11,930
So I'm going to pause there with you and I'm going to sign on to my Google account and then I'm going

39
00:02:11,930 --> 00:02:17,510
to actually record the video again we can see that I signed into my Google account and this page is

40
00:02:17,540 --> 00:02:18,360
open for me.

41
00:02:18,380 --> 00:02:24,240
And it says register your application for Google Maps and read API in Google API icons.

42
00:02:24,590 --> 00:02:27,740
So here it says create a project.

43
00:02:27,740 --> 00:02:31,020
Yet if I open it you can see that my project is here.

44
00:02:31,250 --> 00:02:33,840
So now here I just need to click on continue.

45
00:02:34,130 --> 00:02:38,190
Let's wait a little bit here and here it says enabling API.

46
00:02:38,510 --> 00:02:40,630
So it is the API is enabled.

47
00:02:40,790 --> 00:02:45,270
The project has been created and Google Maps and Android API has been enabled.

48
00:02:45,410 --> 00:02:50,300
Next you'll need to create an API key in order to call the API.

49
00:02:50,300 --> 00:02:53,890
So let's click on Create API key again.

50
00:02:53,900 --> 00:02:58,220
Let's wait a little bit here and now you can see that this page is opened for us here.

51
00:02:58,460 --> 00:03:06,650
So here it is APHC Ickey created used this key in your application bypassing get the key equal operator

52
00:03:06,680 --> 00:03:10,930
API and keep herem it for your API key is this one here.

53
00:03:10,940 --> 00:03:16,850
So let's actually copy this APHC here but just to click on this I can hear copy or you can just right

54
00:03:16,850 --> 00:03:18,910
click on it and then click on copy.

55
00:03:18,920 --> 00:03:24,170
So let's go back to android studio and here you can see this is an attack here.

56
00:03:24,170 --> 00:03:25,150
This is a think tank.

57
00:03:25,190 --> 00:03:27,490
His name is Google Maps key.

58
00:03:27,860 --> 00:03:29,620
And here it is your key here.

59
00:03:29,810 --> 00:03:35,340
So let's delete this value and let's paste that key here right.

60
00:03:35,450 --> 00:03:36,230
That's it.

61
00:03:36,230 --> 00:03:43,140
Now I actually pasted my API here so it makes sure to create your own APHC and then paste it here.

62
00:03:43,140 --> 00:03:45,320
Now here let's go.

63
00:03:45,350 --> 00:03:50,120
Let's open our Android view and let's double click on its manifest folder manifest so that you can see

64
00:03:50,120 --> 00:03:51,970
that this manifest file is actually open.

65
00:03:52,040 --> 00:03:57,500
Let me DoubleClick can this happen in order to make this video so you can see that we have this application

66
00:03:57,500 --> 00:03:59,130
tag right.

67
00:03:59,300 --> 00:04:02,260
And we have this activity main activity.

68
00:04:02,780 --> 00:04:10,680
And you can see that we have this intent filter that says that the main activity is actually luncher

69
00:04:10,730 --> 00:04:11,270
activity.

70
00:04:11,270 --> 00:04:12,550
You can see this here.

71
00:04:12,710 --> 00:04:13,300
Right.

72
00:04:13,610 --> 00:04:19,190
And we also specified that the maps activity so let's let me scroll down here so you can see this meta

73
00:04:19,190 --> 00:04:19,980
data here.

74
00:04:20,150 --> 00:04:22,300
That is actually created for us.

75
00:04:22,390 --> 00:04:23,440
Don't worry about this one.

76
00:04:23,450 --> 00:04:24,640
And look at this activity here.

77
00:04:24,660 --> 00:04:30,310
There is this activity that is created for us automatically when we created the maps activity.

78
00:04:30,680 --> 00:04:31,790
This is the maps activity right.

79
00:04:31,790 --> 00:04:37,300
And we also have this internet filter that says that the maps activity is the latter activity.

80
00:04:37,520 --> 00:04:41,590
We can only have one larger activity inside that application.

81
00:04:41,840 --> 00:04:46,850
So because for now I just want the maps activity to be the latter activity.

82
00:04:46,850 --> 00:04:50,740
We need to delete this intent feature of this main activity here.

83
00:04:50,900 --> 00:04:58,290
So inside this activity that is for this main activity here let's actually highlight this intense filter.

84
00:04:58,980 --> 00:05:01,790
OK and let's delete it right.

85
00:05:01,880 --> 00:05:06,270
So now we only have these maps activity as the launcher activity.

86
00:05:06,310 --> 00:05:06,960
OK.

87
00:05:07,220 --> 00:05:09,050
Let's run the application now.

88
00:05:09,890 --> 00:05:13,700
Let's wait and now let's select one of these emulators and click on OK.

89
00:05:13,940 --> 00:05:17,430
So here you can see that our app is running on the simulator.

90
00:05:17,690 --> 00:05:20,000
And now we can see the map here.

91
00:05:20,240 --> 00:05:20,900
Right.

92
00:05:20,900 --> 00:05:26,930
So by default this can actually give us a location you are in Australia here.

93
00:05:27,080 --> 00:05:32,990
So I'll talk more about this later but right now I just wanted to actually show you how we can just

94
00:05:33,230 --> 00:05:35,180
show the maps to the user.

95
00:05:35,390 --> 00:05:40,640
OK this is the process that we must follow in order to just show the maps to the user.

96
00:05:40,910 --> 00:05:44,750
So in the next tutorials we're going to continue building this application and we're going to continue

97
00:05:44,840 --> 00:05:47,320
adding functionality to this application.

98
00:05:47,330 --> 00:05:48,700
So thank you very much for watching.

99
00:05:48,770 --> 00:05:53,810
If you have any questions about the concepts that I taught you in this lesson please post the discussion

100
00:05:53,810 --> 00:05:57,070
in the course and then I do my best to answer all of your questions.

101
00:05:57,260 --> 00:06:00,150
Thank you very much for watching and I'll see you in the next tutorial.

