The first step in adding Google Maps to your Android applications is to get the API key.
A Google Maps API key is a unique identifier that authenticates your apps requests to Google's mapping
services.
It ensures authentication.
Google knows who's using their API's, user tracking monitors, requests for billing, if applicable,
and security restricts access to only your app.
Your key can access multiple APIs.
Maps SDK for Android, display images in apps, places API searches for location businesses and directions
API get routes between points, and also you can benefit from the key using the geocoding API that converts
addresses to coordinates and vice versa.
Each may require separate enablement in Google Cloud Console will.
In this video, we're going to enable Android Maps and Google Maps SDK.
And we're going to use it in our project.
Let's move to get and generate our Google Maps API key, open Google Chrome, go to console Cloud.google.com,
log in into your Google account.
I have created the before many projects.
Don't worry, you can get uh.
You are going to create the projects by clicking here and create new project.
Then select the project name.
I'll name it as Google Maps Compose app, then select the location No Organization and click on create.
We succeeded in creating the project.
Click Select project.
Make sure that your project appear here.
Okay, so here we are on our project.
There is a very important thing here.
I should mention.
All APIs require a Google Cloud project with billing enabled.
You will need to generate an API key and restrict it properly, for example by app or referrer.
Some APIs are free up to a quota then billed per use.
So as I told you in the previous video, um, we're not gonna exceed this, this quota and we're not
gonna pay anything just for demonstration, also for basic usages.
And you can share your app across your friends, but, uh, and other users, and you can use it properly.
But there is a certain limit, a certain quota.
We're going to discover it later on.
Okay.
So don't worry.
Just, um, just log in into your account.
Uh, also open the project by using the project picker.
And here we are inside the Google Maps Compose app project.
To get the Google Maps SDK.
We can search for a resource here.
For example maps.
Here we have Google Maps platform.
Also, we can scroll down to get the products embed maps.
Google maps platform, geocoding API.
You can see that this is an API that convert addresses to coordinates.
Also, you can get the places API, find info about places, the direction API, get routes and navigation
info, and embed maps in websites using the maps JavaScript API.
Also, you can discover Google products using the view all products.
Okay, but we are interested in the Google Maps platform.
Click on it.
We need to enable it for our project.
And here we get our API key.
Copy it, don't share it across any of your applications, any of your users friends, or even make
it public.
All you can, uh, restrict it for security, so don't worry.
Copy this API key notepad.
And here we have a new tab and paste it here okay.
Then click go to Google Maps platform.
Select Enable or Google Maps APIs for this project and click go to Maps Platform.
Then we have the new API keys can only be used with Google Maps platform APIs and services.
You should set additional restriction additional restrictions to prevent unexpected usage.
Select Android apps.
Then we have the package name.
This is for security.
We can make it later, but it's very important now.
Restricts API key usage to specified Android apps.
Add package name and a one certificate fingerprint for each app.
This is for security.
So in the next video we're going to learn how to get the one certificate fingerprint.
And we're going to create our project in Android.