Dave Jackson
Dave Jackson

Reputation: 837

How to get google maps api key

How to get google maps api key for android, i have read more one articles but not success.

i look code android as below:

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:apiKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    android:clickable="true" />

So my question how to get xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from google? Please give me step by step, thanks.

Thanks.

Upvotes: 2

Views: 11361

Answers (4)

Svyatoslav  Lobach
Svyatoslav Lobach

Reputation: 3963

  1. In command line you need to open Java-> jdk-> bin as for me it is "C:\Program Files\Java\jdk1.7.0_03\bin"
  2. There is "keytool" program which u need. In command line enter "cd C:\Program Files\Java\jdk1.7.0_03\bin"
  3. And enter "keytool -list -v -keystore C:\Users\John\.android\debug.keystore" So the final string in command line must look like: "C:\Program Files\Java\jdk1.7.0_03\bin>keytool -list -v -keystore C:\Users\John\.android\debug.keystore". Whare usually u need only to change the name "John"

There will be SHA-1, MD5, etc

Finally, go to Google Access API google access api

Upvotes: 3

Sagar Vaghela
Sagar Vaghela

Reputation: 1263

Before you start, you will need a specific API key from Google. The key is free, and are required to complete this process.

Go to https://code.google.com/apis/console/, and log in with your Google Account.

The following will appear:

Click on the "Create Project" button.

In the list of services, find Google Maps API v3, and click on "off" to turn it on.

In the next screen, check "I Agree..." and the click the "Accept" button. You will now see that the button next to Google Maps API v3 has changed to "on".

Then click "API Access" in the menu to the left. It will ask you to "Create an OAuth 2.0 client id...".

In the next screen, provide a product name (e.g. "demo"), upload an image (if you want to) as a logo of your project, and click the "Next" button.

In the next screen, choose Application type ("Web application"), and type in your web address, and then click the "Create Client Id" button.

In the next screen, you have got an API key.

Remark Note: Save your API key! (You will need it for all Google Maps applications you develop for the particular URL

Upvotes: 5

Google has updated its Google maps api for android you should check this out here

Upvotes: 0

Waza_Be
Waza_Be

Reputation: 39558

https://developers.google.com/maps/documentation/android/v1/mapkey

Google is not your friend?

$ keytool -list -alias androiddebugkey \
-keystore <path_to_debug_keystore>.keystore \
-storepass android -keypass android

Upvotes: 1

Related Questions