Android: Keystore & API key for google Map

person Jason Huangfolder_openAndroidlocal_offer, , , , , access_time October 3, 2010

Turns out Google wants you to register for a API Key to use in order to use Google Map in your Android app. There are 2 ways to register for API key, 1 is register per domain (used by web application that is hosted on specific domain name), 2nd option is generate a API key based on your key store MD5 checksum (keystore is a key that you use to sign your Android app, whenever you generate a APK file, you use this key to sign your app).

1. To generate MD5 check sum for your developer key store, use the command line tool call keytool.exe (usually it’s in your JRE run time’s bin directory):

keytool -list -keystore my-release-key.keystore

This should prompt you for your password. Enter the password, and the tool should output your MD5 checksum, in the form of:
Certificate fingerprint (MD5): 94:1E:43:49:87:73:BB:E6:A6:88:D7:20:F1:8E:B5:98

2. Based on that MD5, you can go this web page:

3. Paste your MD5, and you will get a API key. Then paste this API key in your android app’s mapview layout file xml file:

                 android:apiKey="<Your API key goes here>"

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>