Generate a SHA1 for Google Maps on Android for Appcelerator Titanium

This is for Mac users:

  1. Visit: http://console.developers.google.com
  2. Create a new project
  3. Navigate to the Enable APIs section
  4. Locate and click on the “Google Maps Android API” service
  5. Click the “Enable API” switch
  6. Once enabled you will need to create permissions with the SHA1. Click the permissions button that shows up.
  7. Fields should be prepopulated with what you need and it should have the Google Android Map API as the service of choice.
  8. Click the “Show me what permissions I need” (Something like that) button
  9. Copy and paste the Titanium application ID (i.e. com.yourappname.app) into the first text box.
  10. Next you’ll generate our SHA1 hash/cert from the Terminal app on your Mac
  11. Paste this in:
    keytool -list -v -keystore ~/Library/Application\ Support/Titanium/mobilesdk/osx/5.1.2.GA/android/dev_keystore

    The version should reflect the most recent build or whichever version you’re using.

  12. The password field can be left blank. Press enter.
  13. Copy the value next to SHA1: F4:EE:…etc
  14. Paste that value into the second text box in the Google developer console next to where you pasted the application ID
  15. Click the create certificate.
  16. Boom. Now you have your key to use in the tiapp.xml file inside of the application node:
    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="GENERATED KEY GOES HERE"/>

Leave a Reply

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