Pages

Wednesday, September 21, 2011

Create API Key for Google map for android


Generate the Certificate Fingerprint 
On Windows, open up a Command Prompt.
In the Command Prompt window, use the cd command to change to the .android subdirectory underneath your "home" directory, e.g. C:\Documents and Settings\xxxx\ where xxxx is your user name.

C:\> cd "\Documents and Settings\xxxx\.android"
Type in the following keytool command.

C:\> keytool -list -keystore debug.keystore

Note: if the system PATH is not set with the Java Development Kit's bin folder, then the full path to the keytool executable in the JDK/bin/ directory need to be used. For example,



C:\> "\Program Files\jdk1.6.0_18\bin\keytool -list -keystore debug.keystore



The following prompt is displayed.


Enter keystore password:
Type in a password, e.g. android.

The following information may be displayed.
Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

androiddebugkey, Feb 2, 2010, PrivateKeyEntry,
Certificate fingerprint (MD5): 94:1E:43:49:87:73:BB:E6:A6:88:D7:20:F1:8E:B5:98
Note down the certificate fingerprint, e.g.  94:1E:43:49:87:73:BB:E6:A6:88:D7:20:F1:8E:B5:98.

Generate the API key
Click this link to http://code.google.com/intl/ja/android/maps-api-signup.html
Type in or paste the certificate fingerprint, accept the terms and conditions and click Generate API Key.

The API key is generated.
Copy this API key and use it in any Android layout.xml file that uses the MapView control.

No comments:

Post a Comment