Discussion Forums  >  Uncategorized

Replies: 12    Views: 405

CWelch
I hate code!
Profile
Posts: 4
Reg: Feb 17, 2011
Colorado
40
02/19/11 07:06 AM (15 years ago)

Question about Maps API Keys

Hi, I am working in Eclipse and trying to figure out the Maps API key. I realize there are two (Debug / Release) but I am not sure what they are suppose to look like... Can someone show me an example of their format? The one I had for the debug looks like a this minus the quotes: $ keytool -list -alias androiddebugkey \-keystore .keystore \-storepass aandroid -keypass android not sure if I am suppose to go a step farther and do something with the above... and the one I got from google appears to be one long series of letters and number. Is this right?
 
CWelch
I hate code!
Profile
Posts: 4
Reg: Feb 17, 2011
Colorado
40
like
02/19/11 07:11 AM (15 years ago)
Ok, so the forum is removing part of debug key from my example above, basically a part in the middle referencing the debug. keystore files location on my C drive. It kind of seems like this might be the wrong format. Any suggestions on this would be greatly appreciated!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/19/11 12:18 PM (15 years ago)
The keys 'look like' this. Here's a sample Google Maps Key: 0jV_4XZu7HzIqMcW6pA2-ao7bI6rmhboqLQMfie You create them with the Keytool. After creating them, copy/paste them in the strings.xml file in your Eclipse project. When Screen_locationmap.java loads, it will first look at the .xml layout file for intstructions on how to layout the map. The .xml file of the map is.. res/layout/screen_locationmap.xml You'll see in that file where it is pointing to the Google Map Key from the strings.xml file. This is where you change it to point to the debug or release key you have entered in strings.xml Hope this helps
 
FrudeCoder
Aspiring developer
Profile
Posts: 19
Reg: Mar 05, 2011
Canton, GA
190
like
04/13/11 06:20 AM (14 years ago)
I am stuck on getting the API keys to begin with. I am working on an app that has multiple locations on a map, but where do I get the API keys? I looked on code.google.com and it wants a web url in order to generate the Key. What do I do here? Thanks! -Geoff
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/13/11 12:02 PM (14 years ago)
Did you see this: http://code.google.com/android/add-ons/google-apis/mapkey.html Getting the keys is nerdy...it's a matter of firing up the command line tool and entering some values. Read the info at the at URL.... re-post if you're totally lost ;-)
 
FrudeCoder
Aspiring developer
Profile
Posts: 19
Reg: Mar 05, 2011
Canton, GA
190
like
04/14/11 12:27 PM (14 years ago)
OK. After much nerdiness I got the Debug key, put it in, made the code adjustments and got everything working right in the Android simulator (woo-hoo!) How do I now get the release key?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/14/11 12:59 PM (14 years ago)
The Release keys are created in exactly the same manner as the Debug keys. Using the KeyTool. Just like the release key, it's a command line thing. Just a matter of entering the right command when you create them. The URL above, the one posted earlier shows this too (I think?)
 
Kasca
I hate code!
Profile
Posts: 6
Reg: Oct 26, 2010
Seattle, WA
60
like
04/18/11 09:40 PM (14 years ago)
Where do I open the command line tool? I think I can get it if I understand where to enter the values. Thanks
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/18/11 09:43 PM (14 years ago)
Hi in Seattle... did you see this: http://code.google.com/android/add-ons/google-apis/mapkey.html On a Mac, the command line prompt is opened by launching the Terminal App (look in Applications folder). On Windows..it's Start Button > Run > Command
 
FrudeCoder
Aspiring developer
Profile
Posts: 19
Reg: Mar 05, 2011
Canton, GA
190
like
04/19/11 08:21 AM (14 years ago)
Still stuck. to get the debug key I found the path to the .keystore file fro debug, but there is no other .keystore file anywhere on my computer. I am guessing I have to get eclipse to generate one for the particular app I am working on but I cant figure out how...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/21/11 10:51 PM (14 years ago)
@ FrudeCoder: Did you get this figured out? This last post slipped under my radar ;-) Eclipse doesn't generate keystores...the keytool does. Are you saying you've already done: keytool -list -keystore ~/.android/debug.keystore and keytool -list -keystore ~/.android/release.keystore using the keytool? If so, you've done the hard work. You could also see this super-duper-helpful URL http://www.youtube.com/watch?v=vgr4l1nsFdU&feature=related
 
FrudeCoder
Aspiring developer
Profile
Posts: 19
Reg: Mar 05, 2011
Canton, GA
190
like
04/22/11 10:16 AM (14 years ago)
I did get it. I think I told you via email once I got it instead of on the forums. All is well, and thanks again for your time.
 
jireh70
Lost but trying
Profile
Posts: 28
Reg: Apr 11, 2011
Pittsburgh, PA
280
like
05/10/11 01:07 PM (14 years ago)
Would it be possible to do a simpler explanation. I got the MD5 and the API key, I don't understand where it goes. I have watched the video and successfully commented and uncommented the lines of code so I now see the markers but the map is still blank.
 

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.