WEBVTT

00:00.080 --> 00:04.160
Now we need to create a project in Google Cloud.

00:04.160 --> 00:09.720
Go to console.cloud.google.com and login into your account.

00:09.720 --> 00:11.960
Create a new project.

00:11.960 --> 00:21.760
So from here create a new project project name Uber Cloud and here select no organization or any other

00:21.800 --> 00:28.040
projects and you are viewing Google Maps compose app in organization organization.

00:28.040 --> 00:30.160
We need to view our project.

00:30.160 --> 00:32.920
So from here select Uber Clone.

00:33.120 --> 00:36.040
And now we are viewing the project Uber.

00:36.080 --> 00:39.400
Let's add the APIs and services.

00:39.400 --> 00:40.680
So click on this.

00:41.000 --> 00:50.320
And by the way in order to get all products all APIs free, you need to uh like authenticate your your

00:51.160 --> 00:59.240
account by enabling and adding the payment, uh, payment methods, your and your credit card.

00:59.240 --> 01:07.480
By the way, there is no fees, no hidden fees, no, uh, dollars to pay on Google Cloud Console if

01:07.480 --> 01:10.740
you don't, exceed a specific code.

01:10.860 --> 01:16.660
So in this course and in these videos, we're not exceed their quotas.

01:16.660 --> 01:19.980
And we're not gonna pay anything from here.

01:20.220 --> 01:24.620
Go to library and make sure you select the project.

01:24.660 --> 01:26.660
Your project Uber clone.

01:26.700 --> 01:27.380
Clone.

01:27.420 --> 01:30.020
You can search for APIs and services.

01:30.300 --> 01:32.300
This for maps.

01:32.300 --> 01:36.860
You can select or discover 32 APIs.

01:36.860 --> 01:42.700
And those are very important and very interesting things you can learn.

01:42.740 --> 01:43.100
Okay.

01:43.140 --> 01:45.820
We're gonna learn about a few of them.

01:45.820 --> 01:56.460
Also, you can discover machine learning APIs, Google Workspace, YouTube drive, social advertising,

01:56.820 --> 02:00.500
mobile, Google Enterprise APIs, and others.

02:00.540 --> 02:03.980
Okay, those are very interesting APIs.

02:04.140 --> 02:11.540
But in this course and in this section, we're gonna implement Google Maps Places API.

02:11.820 --> 02:16.010
And we're gonna include that directions API also.

02:16.050 --> 02:20.530
Okay, so from here maps SDK click enable.

02:20.530 --> 02:29.930
If you didn't verify your account, there is a new window to use the the default payment gateways and

02:29.930 --> 02:31.930
default payment methods.

02:31.930 --> 02:41.090
So after getting verified and adding your account and billing account billing payment method, you'll

02:41.090 --> 02:43.290
get your API key.

02:43.570 --> 02:52.650
Copy your API key, go to Google Maps, select restriction type Android apps package name.

02:53.010 --> 02:55.610
Here we need the package name.

02:55.890 --> 02:59.730
You can get it from the main activity, so copy it.

02:59.770 --> 03:00.290
Paste it.

03:00.290 --> 03:06.050
Here we get the h1 s h a1 a certificate.

03:06.050 --> 03:15.610
As we done before go to Gradle, select the signing report, click enter and here inside the Logcat

03:15.650 --> 03:19.530
you'll get the SHA1 certificate.

03:19.530 --> 03:26.750
Scroll up and here get the SH one fingerprint paste it restrict key.

03:27.070 --> 03:27.950
And here we go.

03:27.990 --> 03:32.350
We restrict our project to this Google Cloud project.

03:32.590 --> 03:35.390
Enable APIs preview APIs.

03:35.510 --> 03:39.870
And here you can select places SDK and maps SDK.

03:39.990 --> 03:41.470
Okay click done.

03:41.470 --> 03:42.430
And here we go.

03:42.750 --> 03:50.190
We can get the places SDK autocomplete map on your project and others okay.

03:50.230 --> 03:53.510
But we are interested in getting the Android.

03:53.710 --> 03:58.190
So here maps SDK for Android click on it.

03:58.190 --> 04:04.070
And we've added before this Google Cloud or Google Map.

04:04.310 --> 04:07.990
Now let's run this application Alt+.

04:07.990 --> 04:14.950
Enter to import the function, select the app, the app and then run the project.

04:14.990 --> 04:16.390
We have a crash.

04:16.750 --> 04:21.270
Maybe we missed the the internet permissions I think.

04:21.270 --> 04:25.030
So I need to get the API key and the permissions.

04:25.030 --> 04:27.190
So go to the manifest.

04:27.190 --> 04:34.820
Inside this manifest we need to declare the permissions, so uses permission internet.

04:34.820 --> 04:42.380
Also, we need to specify here before the activity and inside the application we need to specify the

04:42.420 --> 04:44.180
Google Maps API key.

04:44.460 --> 04:47.860
So meta data Android name.

04:48.060 --> 04:57.140
Com dot Google dot Android dot g o dot API underscore key.

04:57.460 --> 05:01.060
And here we need to specify the value.

05:01.100 --> 05:03.660
Let's go back to the Google Maps.

05:03.660 --> 05:10.780
We need the APIs and services or the keys and credentials so you can get them.

05:10.820 --> 05:12.460
Click show key.

05:12.700 --> 05:18.420
Copy this key and paste it here okay then close it.

05:18.420 --> 05:19.380
Run again.

05:19.620 --> 05:24.860
And this is very important because this is the API key for Google Maps.

05:24.860 --> 05:33.500
So this will connect and authenticate this project to the Google Cloud Platform okay let's run.

05:33.500 --> 05:34.420
And here we go.

05:34.620 --> 05:38.420
The map appears and everything is working fine.
