Sunday 16 October 2011

Obtain Android Google Maps SDK Debug Certificate

For developing your Google Maps application for android, I would like to obtain a debug Google Maps SDK debug certificate before production release. Android.com provides a very thorough instruction for helping newbies and beginners. Here I just list the steps that I went through in my own development environment: Windows 7 32bit + JDK1.7.0. Hope it would help simplify your learning curve.


1. Locate your debug.keystore.
    By default, build tools create the debug keystore in the active AVD directory which varies by platform:
  •     Windows Vista/7: c:\users\<user>\.android\debug.keystore
    For eclipse/ADT user, go to Windows -> Preferences -> Android -> Build for the full path of debug.keystore.

2. After the debug.keystore was located, use keytool utility to obtain the MD5 fingerprint of the debug certificate.
    Replace the below command with your JDK installation path and your actual user id
    "c:\program files\java\jdk1.7.0\bin\keytool" -v -list -alias androiddebugkey -keystore c:\users\<user>\.android\debug.keystore -storepass android -keypass android
    Note: only the MD5 fingerprint is recognized by Google. Other version, such as SHA1/256, is new since JDK 1.7, and cannot be used for registering Google Maps API.

3. Now, follow steps below to register your debug certificate with Google Maps Service
  1. Go to http://code.google.com/android/maps-api-signup.html
  2. If you don't have a Google account, use the link on the page to set one up. 
  3. Read the Android Maps API Terms of Service carefully. If you agree to the terms, indicate so using the checkbox on the screen. 
  4. Paste the MD5 certificate fingerprint of the certificate that you are registering into the appropriate form field. 
  5. Click "Generate API Key" 
The server will handle your request, associating the fingerprint with your developer identity and generating a unique Maps API Key, and then will return a results page that gives you your Key string.

No comments:

Post a Comment