Discussion Forums  >  Maps, Device Location, Tracking

Replies: 12    Views: 322

mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
09/09/13 01:52 PM (10 years ago)

Maps Android 3.0 - Be Sure To Enable Services!

So, I had issues trying to get maps to work in the new setup. I followed the great instructions by SmugWimp however, I still had problems. http://www.buzztouch.com/forum/thread.php?tid=F87D29BA17032DE4EF7DBDE I had the keystore because it is an old app. I regenerated the key in the Google API Console. However, one small minor overlook about the Google API. I did not have have the Google Maps API v3 & Google Maps Android API v2 enabled. I check a few other services to be sure. After I did that voila it worked great! So if maps aren't showing up. Follow this: 1. Visit: https://code.google.com/apis/console/ 2. Click the Services tab on the left side 3. Be sure to enable this: Google Maps API v3 & Google Maps Android API v2 I've enabled a few more lol, so not sure about those as well Google Maps Geolocation API Google Maps SDK for iOS Google Maps API v2 Google Maps Geolocation API It doesn't hurt to check those above!
 
Cakebit
Code is Art
Profile
Posts: 500
Reg: Dec 15, 2010
In your local b...
16,500
like
09/09/13 03:57 PM (10 years ago)
Thanks mysps, I tried using Android maps without success before and gave it up, Maybe I can now make it work :)
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
09/18/13 05:09 PM (10 years ago)
Hey Mysps, curious how you made it work! Old tutorials cant be followed as debug and release string are not in the strings.xml anymore etc.. I found a API Key part in the manifest, but if I enter my debug or release key I still dont see the map. Did I miss something?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/18/13 05:12 PM (10 years ago)
did you import the google_play_services and delete the original google_play_services file inside of the libs folder?
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
09/18/13 05:17 PM (10 years ago)
yes I did
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/18/13 05:28 PM (10 years ago)
so your libs folder doesn't contain anything and you've imported the library correctly and imported it by click properties I did deleted the old api key and generated new one in the Google Console. Make sure everything is enabled and you should be set. Yes, I to was lost with the manifest file and You have this also right, in your manifest? <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="YOURID"/> I think maybe your key is wrong because you have everything else correct it seems. I had the same problem when I was trying make facebook work with Scringo.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
09/18/13 05:34 PM (10 years ago)
yep, so the only place to put the API is in the manifest, correct? I still have 2 keys from a different app that is in google play since a year or so. I assume I can use the keys I generated that time for a new different app now, or not? I have an androiddebugkey and an androidreleasekey as that was the case before v3 came. Tried both and the map does not show. If I enter google, the V2 and V3 are enabled but not sure where to generate a new key?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/18/13 05:43 PM (10 years ago)
Its different I believe bc its v2. I created a new key, I would recommend the same bc you have everything else correct Here: https://code.google.com/apis/console/ Then click API Access on your left Next Key for Android apps (with certificates) - Delete the old key and generate a new one.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
09/18/13 06:05 PM (10 years ago)
hmm, well got a key for android apps but still it doesnt work. Funny LogCat things: 09-19 03:02:44.328: I/Google Maps Android API(29828): Failed to contact Google servers. Another attempt will be made when connectivity is established. 09-19 03:02:45.623: D/dalvikvm(29828): GC_CONCURRENT freed 799K, 43% free 11860K/20679K, paused 39ms+7ms, total 175ms 09-19 03:02:59.643: E/Google Maps Android API(29828): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors). No real clue what to do next :( 03 AM now, time for bed, maybe I am smarter tomorrow or you have another idea? good night.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/18/13 06:16 PM (10 years ago)
did you actually add the google services library to eclipse? trust me, i know your frustration. smug wimps tutorial is excellent check it here: http://www.buzztouch.com/forum/thread.php?tid=F87D29BA17032DE4EF7DBDE
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
09/19/13 06:01 AM (10 years ago)
Yes I am sure, as I get red erors if I do not include the google services. :(
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
09/19/13 10:10 AM (10 years ago)
finally.... Had to be something stupid ;-) I activated "Google Maps API v2" instead of "Google Maps Android API v2" Now it works! Thx for your help! Wouldnt have done it without you!
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/19/13 10:24 AM (10 years ago)
Oh ok. lol. I was just as confused about as you so I activated EVERYTHING :) Great I'm happy its working!
 

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.