Now I will explain how to get Google Map API key for Android Application Development. To do this first we should know where the
debug.keystore reside in your system.
Getting the 'debug.keystore' path:
To find it , In Eclipse navigate to
Windows->Preferences->Android->Build Her you will find the path near
Default Debug Keystore:"C:\Users\<your_name>\.android\debug.keystore"
Getting the 'MD5 Certificate Fingerprint':
Now that you have the keystore path we are ready to get the
MD5 Certificate Fingerprint . Open Command Prompt (type
cmd in run and press enter) and navigate to
Program Files (x86)\Java\jre6\bin
and type the command
keytool -list -alias androiddebugkey -keystore "C:\Users\<your_name>\.android\debug.keystore" -storepass android -keypass android and press enter.
You will be given a Certificate Fingerprint like
2G:54:39:DB:23:E7:D7:3A:9E:18:3D:7F:FB:6D:BC:9D
Refer the below Image for reference:
.
Getting the API Key:
Now that we have got the Certificate Fingerprint log in to your Google Account and open the link ->
https://developers.google.com/android/maps-api-signup
Read the terms and conditions accept it and paste the MD5 Fingerprint in the textbox and click
Generate API key button. You will be given an API key like
0XQpOUpGrVszoIS6vgtJ6oSdcYj1wRHnxj_4EHg
Paste the API key in your layout file where MapView is used:
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="0XQpOUpGrVszoIS6vgtJ6oSdcYj1wRHnxj_4EHg "
android:clickable="true"
/>
Note : The Map would be shown only in the Emulator in the computer where you generate the finger print since this is a debug key.If you wish to show map in different devices generate the key using the applications publishing keystore.