Thursday, June 6, 2013

Creating Google API key for Map v2

The key will be needed in AndroidManifest.xml like this... 

<meta-data
          android:name="com.google.android.maps.v2.API_KEY"

          android:value="AIz...jshdkfjhdsjkhfkdjsh..bMI"/>

To get the key go to:

https://code.google.com/apis/console/

1) create a NEW app (drop-down on the left Create...)
2) Select "Services" and turn on Maps...

3) API Access "Create new Android Key.." button

4) Terminal:
$ cd .android/
uki$ keytool -list -v -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android 
Alias name: androiddebugkey
Creation date: Nov 23, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 4ecdba20
Valid from: Wed Nov 23 21:29:36 CST 2011 until: Fri Nov 15 21:29:36 CST 2041
Certificate fingerprints:
MD5:  7E:FA:01...fkdjsflkjdlksjflkdsjlfjdsljfljlkdsf....:49:61:36
SHA1: D0:5...sdjkflkdsjflkjsdklfjdsljkdsl....F:A1:43
Signature algorithm name: SHA1withRSA
Version: 3
uki:.android uki$ 


5) Enter the SHA1 key, SEMICOLON; and PACKAGE NAME of your app



6) copy the successfully generated KEY to AndroidManifest.xml

Yay!