Google Maps Keys

Google requires that all applications using the map view, which retrieve data from google maps, are signed and uses a Map API key

In the drunkendroid project we have included a debug.keystore in the resources folder, which you will have to set in your preferences-> android as the one to use for debugging, this key has been used to generate a google map API key

Debug Fingerprint androiddebugkey, Oct 7, 2009, PrivateKeyEntry?, Certificate fingerprint (MD5): AD:5F:EE:A8:30:01:7E:D0:AF:B7:E6:C9:C9:5E:0E:61

API-KEY 0VA24ZIeDjEl4gOtgk8VvYQ0XlzbOKHXc1_XJ7A

Here is an example xml layout to get you started on your way to mapping glory:

<com.google.android.maps.MapView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:apiKey="0VA24ZIeDjEl4gOtgk8VvYQ0XlzbOKHXc1_XJ7A"
  />

Adding the Maps API Key to your Application

Once you've registered with the Google Maps service and have obtained a Maps API Key, you must add it to your application's MapView? objects, so that the Maps server will allow them to download Maps tiles. For <MapView?> elements declared in XML layout files, add the Maps API Key as the value of a special attribute — android:apiKey.[[BR]]

For example:

<com.google.android.maps.MapView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:enabled="true"
  android:clickable="true"
  android:apiKey="example_Maps_ApiKey_String"
  />

For MapView? objects instantiated directly from code, pass the Maps API Key string as a parameter in the constructor.

For example:

mMapView = new MapView(this, "example_Maps_ApiKey_String");

Final Steps to Enable MapView? Elements

If you've added the Maps API Key to the MapViews? in your application, here are the final steps to enable the MapView? elements to run properly: Make sure that you added a <uses-library> element referencing the external com.google.android.maps library. The element must be a child of the <application> element in the application's manifest.

For example:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.example.package.name">
   ...
   <application android:name="MyApplication" >
     <uses-library android:name="com.google.android.maps" />
       ...
   </application>

Sign your application with the certificate that corresponds to the Maps API Key referenced in your MapView? elements.