How to get google map apikey in android

74,084

Solution 1

If you already have the key got the link below and add the fingerprint along with your android project package name

You also need to login to your google account

https://code.google.com/apis/console

enter image description here

Click on create new key. Add the fingerprint along with your android project package name.

enter image description here

You can see the api key above

Enable google map api v2 from services tab.

enter image description here

Then in manifest file under application tag

 <meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my key"/>

Solution 2

Visit the API Console

Login with your Google acocunt and click the API Access tab. Your API key is listed there.

You will also need to enable Google Maps Android API v2 service for your API key. You can do that on the services tab via the toggle button.

Solution 3

developer link

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

write below code in cmd and you get mdfi key then it will paste on google site

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

other link is below

http://docs.xamarin.com/guides/android/platform_features/maps_and_location/obtaining_a_google_maps_api_key

Solution 4

I faced the same problem and my issue was I used debug certificate not release certificate

if you use this for release certificate "not debug certificate":

Enter the following at a terminal or command prompt:

keytool -list -v -keystore your_keystore_name -alias your_alias_name

in your_keystore_name write the path for the file you used for signed api which its extension .jks

take the sha1 which you will get in the output and used it to get the key.

https://developers.google.com/maps/documentation/android-api/signup#display_your_apps_certificate_information

Share:
74,084
ishu
Author by

ishu

Updated on February 14, 2020

Comments

  • ishu
    ishu about 4 years

    Hi At that time working on google map. I want to display map in my activity. I successfully display the map view. But i cant show the map i think i have wrong api key so how can i get api key of google map. I create the keystore and all procedure but i didn't have idea how to get api key from this keystore.

    I also give the all permission in manifest file and also add the google map library than also i cant show the map.in activity also extends mapactivity and also write code fro map in xml.

    If anyone knows about that please tell me.

  • Mehul Joisar
    Mehul Joisar almost 11 years
    as u have edited your question from map to google map ,my answer has no significance.kindly ignore it.
  • ishu
    ishu almost 11 years
    E3:7D:23:7D:FA:61:9F:7E:11:CC:43:90:42:66:A9:C7:8E:CB:20:5C my key store is this but i didnt get any idea
  • Raghunandan
    Raghunandan almost 11 years
    go to the link code.google.com/apis/console click create new key and add key followed by ;com.example.android.mapexample where com.example.android.mapexample is the package name. You should see the key. also enable google map apiv2 services from service section.
  • ishu
    ishu almost 11 years
    i have no idea about how to register my app in Google Maps Android API v2..:(
  • Raghunandan
    Raghunandan almost 11 years
    @ishu have you followed all the steps from developers.google.com/maps/documentation/android/start. if there is problem with getting the key follow the above steps
  • Raghunandan
    Raghunandan almost 11 years
    @ishu if it helps pls upvote the answer by clicking the up arrow once
  • ishu
    ishu almost 11 years
    i wnt some code related the map now map v1 is depricted so in v2 use the map frgment