Obtain Google api key maps

Before proceeding to make your first Android Studio Google maps application, you must obtain Google api key maps first. So, for Google Maps Android API, in Android studio, go to:
Tools→Android→SDK Manager

Tools-SDK-Manager

Then click on Launch Standalone SDK Manager

Launch-Standalone-SDK-Manager

See standalone SDK Manager

Android-SDK-Manager-MapView

And, if there are not already installed, install under Extras, Google Play Services and Google Repository.

Extras-Google-Play-Services-Google-Repository

Then you need to obtain Google API key map. So go to Google developer

Use-Google-APIs

You must have Google developer account for this.

Create-a-new-project-Google-Developer-console

Start new project

Api-Manager-Credentials

Obtain your API key.

Api-Manager-Credentials2

API key is expected to be somewhat similar to this:
AIzaSyC*ha*IY*mZ*Q*qE*9l*aB*_S*Yw*_0***
Now, you can start to develop your first Google Maps application in Android Studio.

There is also shorter way to obtain Google API key map. Start new Google Maps project in Android Studio. Once, when it is created, go to
app→res→values→google_maps_api.xml

Go to code under the comment, and copy address that should look similar to this one:

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=E2:BD:B0:0A:2E:7E:EF:97:E8:80:98:A9:48:49:C5:0C:DC:5D:7E:92%3Bcirvirlab.nativnagooglemaps

Paste it to your browser and you will obtain Google API key map (if you log in with your Google developer account). Now, let’s start with our first Google Maps application.

 

Posted in android Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *

*