Discussion Forums  >  Uncategorized

Replies: 17    Views: 1178

MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
08/11/11 09:41 PM (14 years ago)

Google Maps API Tutorial (Android)

After struggling through this and finally having success, I thought I'd write up a step-by-step guide for what worked for me. This is using eclipse on a Mac: Create a folder in your Documents folder called googlekeys (or whatever you want) With your BuzzTouch App open in eclipse: Click File -> Export -> Export Android Application Name your project at the Select the project to export prompt. Click Next Select create new keystore Set the location for the new keystore to Documents/googlekeys and save as googlekeystore (or whatever you want, just remember the name). Enter and confirm a password Enter an alias (ie. appAlias), password, confirm and set validity for 100 years. Enter your name and click next Select a destination for the APK file. I have a folder in my Documents folder called Android APKs TO CREATE YOUR DEBUG KEY: Open terminal. Enter the following command to get the debug md5 fingerprint: keytool -list -keystore ~/.android/debug.keystore password: android Copy the debug md5 fingerprint. It will look like this: 52:17:0F:1C:B6:D6:66:45:59:A9:CD:A6:84:C4:DB:F3 In your browser, go to: http://code.google.com/intl/pt-PT/android/maps-api-signup.html Paste the md5 fingerprint, click Generate API key Copy the google key, create a text file and paste the debug key so you can access it later. TO CREATE YOUR RELEASE KEY: In the terminal, enter the following. Make sure to use the correct alias name you entered above, and the keystore directory and name (ie. googlekeys & googlekeystore): keytool -list -alias alias-you-created-before -keystore /Users/yourusername/Documents/googlekeys/googlekeystore You'll be prompted for a password. Enter the password you created earlier. Copy the md5 release fingerprint. In your browser, go to: http://code.google.com/intl/pt-PT/android/maps-api-signup.html Paste the md5 fingerprint, click Generate API key Copy your google key and paste it into your text file for reference later. Now follow the BuzzTouch video tutorial on updating the map keys. Hope this helps. It worked for me.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
08/11/11 10:47 PM (14 years ago)
Very Awesome! No doubt tons of users will find this useful.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/12/11 01:54 AM (14 years ago)
applause.
 
slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
like
08/12/11 06:50 AM (14 years ago)
Wait so are you just making a new md5 hash from a new keystore that you are calling googlekey?
 
tiger
Aspiring developer
Profile
Posts: 121
Reg: Dec 26, 2010
USA
1,210
like
08/12/11 02:31 PM (14 years ago)
Thanks MGoBlue. This will really help a lot of people. The thing I learned the hard way is you may need a new release key for each new project. But, you can use the Debug key over and over and over and over and over again. Always test your release key with the application using a android phone if possible.
 
slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
like
08/12/11 10:11 PM (14 years ago)
Yes you do for each project, you also need a new .keystore because its considered its fingerprint.. the print comes from the keystore.
 
steveh6883
buzztouch Evangelist
Profile
Posts: 383
Reg: May 15, 2011
Gosport, UK
3,830
like
08/16/11 04:17 PM (14 years ago)
No you don't - I use the same keystore & alias (company name) for ALL release apps, thus having the same md5 fingerprint, and therefore only needing the ONE GoogleMaps API key for ALL apps - no problems with functionality Steve
 
michwolv
I hate code!
Profile
Posts: 3
Reg: Aug 21, 2011
New York, NY
30
like
08/24/11 08:56 PM (14 years ago)
thanks to this tutorial, i was finally able to generate an fingerprint, however its not in MD5 format, its in SHA1. how do I either convet SHA1 into MD5 or get the keystore to generate MD5?
 
tiger
Aspiring developer
Profile
Posts: 121
Reg: Dec 26, 2010
USA
1,210
like
08/25/11 12:31 AM (14 years ago)
Are you on a PC or MAC. I think the above is for MAC only. Below are the two commands for the PC. The last one is for the MAC and Linux. To generate an MD5 fingerprint of the debug certificate, first locate the debug keystore. By default, build tools create the debug keystore in the active AVD directory. The location of the AVD directories varies by platform: Windows Vista: C:\Users\<user>\.android\debug.keystore Windows XP: C:\Documents and Settings\<user>\.android\debug.keystore OS X and Linux: ~/.android/debug.keystore
 
michwolv
I hate code!
Profile
Posts: 3
Reg: Aug 21, 2011
New York, NY
30
like
08/25/11 06:02 AM (14 years ago)
I tried using the correct windows directory, I got a different fingerprint, but its still listed in (SHA1) format and not MD5. Could it be my computer?
 
TonyM
Aspiring developer
Profile
Posts: 37
Reg: Jun 29, 2011
Gold Coast Aust...
370
like
10/12/11 06:15 AM (14 years ago)
McGoBlue I have been going around in circles to even find the jump off point to create these - thanks to you I can finally go to bed tonight! your worth more money! Regards Tony
 
swa7swa
Android Fan
Profile
Posts: 1
Reg: Oct 25, 2011
location unknow...
10
like
11/01/11 07:20 AM (14 years ago)
MGoBlue ... life saver! ..... why this tutorial is not a main link on the website is beyond me. SDK Google API platform 1.6 version 4 isnt available for us (as the video tutorial tells us to use). I had to use 2.1 Google APIs. Also it doesn't work on the emulator when I run it (just shows blank map tiles and my red pin location)but I uploaded to my phone and works great. Wow I will never get those 20 hours of my life back....arrgggghhhhh!
 
CBreeze
I hate code!
Profile
Posts: 50
Reg: Nov 12, 2011
Anchorage
500
like
11/19/11 06:18 PM (14 years ago)
Thanks MGoBlue. your help is greatly appreciated by this newbie.
 
jawdoss
Android Fan
Profile
Posts: 359
Reg: Jun 10, 2012
Gold Coast, Que...
9,090
like
06/14/12 05:00 AM (13 years ago)
How do you get the MD5 finger print on mac?????????? I am so confused i have read through googles developer site as well!
 
jawdoss
Android Fan
Profile
Posts: 359
Reg: Jun 10, 2012
Gold Coast, Que...
9,090
like
06/14/12 05:13 AM (13 years ago)
OMG I GOT IT! THANK YOU SO MUCH!!!!!!!!!
 
fratony
I hate code!
Profile
Posts: 77
Reg: Aug 14, 2012
Devon
5,370
like
11/24/12 06:16 AM (13 years ago)
I am so glad to have found this as nothing else has been working but I am still getting stuck. I am good with the instructions up to to point I have to enter the password in the terminal window. I cannot type anything. If I try typing 'android' there is no obvious text entered and when I hit return it just says "keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect". Can anyone shed any light? Thanks
 
fratony
I hate code!
Profile
Posts: 77
Reg: Aug 14, 2012
Devon
5,370
like
11/24/12 06:46 AM (13 years ago)
Ok - I think I have a fix but using the Eclipse keytool plugin from this thread: https://www.buzztouch.com/forum/thread.php?tid=F7C6774F77ABA0B0125C141 That help me find the MD5 key straight away. Let's see what happens next!
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
02/26/13 06:40 PM (12 years ago)
Still rocking after all these posts...... You are still the man @MGoBlue Peace
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.