Android – How to obtain Google API key for Windows?
C:\Documents and Settings\ |
C:\ Users \ .android \ debug.keystore (Windows 7 / Windows Vista) |
If you don’t find debug.keystore in above location, then you can select Windows –> Preferences –> Android –> Build (In case of Eclipse) to check the full path of debug.keystore.
Now navigate the path of keytool.exe in command prompt. keytool.exe is located inside Java –> JDK – > bin folder inside program files.In command prompt window write the following command
The
Androiddebugkey, Dec 4, 2011, PrivateKeyEntry,
Certificate fingerprint (MD5): BE:05:C8:F2:42:7A:97:37:78:EE:BD:4A:31:7D:A6:69
Copy the fingerprint. Now, load the page https://code.google.com/android/maps-api-signup.html in your browser. Enter your Certificate fingerprint and hit “Generate API key” button.
Now you will get Google API key
Here is an example xml layout to get you started on your way to mapping glory:
xml version="1.0" encoding="utf-8"?>
LinearLayout xmlns:android="https://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
com.google.android.maps.MapView
android:id="@+id/mapview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0ZzHJOolD-XzqDu5o4ZU5SBQo66sCis9eNTXd0g"
/>
LinearLayout>