Getting Your Maps API

In order to use a Map View in your application you must first obtain an API key from the Android developer web site at

Without an API key the Map View will not download the tiles used to display the map.

To obtain a key you need to specify the MD5 fingerprint of the certificate used to sign your application. Generally, you will sign your application using two certificates —a default debug certificate and a production certificate. The following sections explain how to obtain the MD5 fingerprint of each signing certificate used for your application.

Getting Your Development/Debugging MD5 Fingerprint

If you are using Eclipse with the ADT plug-in to debug your applications, they will be signed with the default debug certificate. To view map tiles while debugging you will need to obtain a Maps API key registered via the MD5 fingerprint of the debug certificate.

You can find the location of your keystore in the Default Debug Keystore textbox after selecting Windows O Preferences O Android O build. Typically the debug keystore is stored in the following platform-specific locations:

> Windows Vista \users\<username>\.android\debug.keystore

> Windows XP \Documents and Settings\<username>\.android\debug.keystore

> Linux or Mac ~/.android/debug.keystore

Each computer you use for development will have a different debug certificate and MD5 value. If you want to debug and develop map applications across multiple computers you will need to generate and use multiple API keys.

To find the MD5 fingerprint of your debug certificate use the keytool command from your Java installation, as shown here:

keytool -list -alias androiddebugkey -keystore <keystore_location>.keystore -storepass android -keypass android

Prepared for ASHLEE KABAT, email: [email protected] Order number: 56760408 This PDF is for the purchaser's personal use in accordance with the Wrox Terms of Service and under US copyright as stated on this book's copyright page. If you did not purchase this copy, please visit to purchase your own copy.

Getting your Production/Release MD5 Fingerprint

Before you compile and sign your application for release, you will need to obtain a map API key using the MD5 fingerprint for your release certificate.

Find the MD5 fingerprint using the keytool command and specifying the -list parameter and the keystore and alias you will use to sign your release application.

keytool -list -alias my-android-alias -keystore my-android-keystore

You will be prompted for your keystore and alias passwords before the MD5 fingerprint is returned.

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide

Post a comment