Search This Blog

Tuesday 8 May 2012

Obtaining Google Maps API key in Android


Obtaining Google Maps API key in Android

To obtain the Maps API key, you need to register for the same using your Google account. While registering, they ask you to provide an MD5 fingerprint of the certificate that you will use to sign your application.
Use Keytool to generate the fingerprint of the appropriate certificate.
For that, follow the steps mentioned below:
Ø    Be sure about your Java bin folder path. This would be the possible path; C:\Program Files\Java\jre7\bin
Ø    Now, open command prompt window and set the path to the bin folder.
Ø    Find the Default Debug Keystore path from your Eclipse. For that, select Window menu from the top bar and move to the following window; Window>Preferences>Android>Build. Copy the Default Debug Keystore path from there. Possible path would be

C:\Documentsand Settings\Administrator\.android\debug.keystore

Ø    Then, type this in command prompt window.
keytool –list –alias androiddebugkey –keystore “C:\Documents and Settings\Administrator\.android\debug.keystore” –storepass android –keypass android

Ø    This would generate the MD5 fingerprint. If SHA1 is generated, then insert a ‘–v ‘ before –alias in the above command.
Ø    Now copy the fingerprint generated and provide it at the website;
http://code.google.com/android/maps-api-signup.html.
Ø    Now the API key is ready and start with your Map viewing activity creation. 

No comments:

Post a Comment