Discussion Forums  >  Uncategorized

Replies: 5    Views: 532

Gasguzziler
Aspiring developer
Profile
Posts: 53
Reg: Nov 24, 2010
Seattle
530
12/08/10 05:01 PM (15 years ago)

google maps problems

well I have an app in the market now and the map is now having problems. When you open the map it shows the location of the phone and the location of where to go but there is no background it is just a grid. I thought it might be a problem with my api key being I had used the same one with 2 different apps but they were both signed with the same keystore. Well I built a new keystore and resigned my app with a different key and a new google api key but the problem still persists. what could it be, it does seem to function correctly but the map isnt in the background
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/09/10 12:17 AM (15 years ago)
You are for sure on the right track with the Google Map API key thoughts. This is for sure the cause, I say this with 100% certainty. You do not need a new set of API keys for each app but there is a difference between Developer / Debug keys and Release / Production keys. This means you'll need to make sure you have created your keys for each situation and inserted them properly in the strings.xml file when compiling for Debug or Release.
 
Gasguzziler
Aspiring developer
Profile
Posts: 53
Reg: Nov 24, 2010
Seattle
530
like
12/09/10 12:22 AM (15 years ago)
I have done that, and the maps were working when they were first submitted to the market. They do seem to function but the map doesn't show up, so it is like it shows where my phone is and where the endpoint is for the location that I have on the map but the background is just a grid and the map never loads. It is now doing this on all three apps that I have and it is getting frustrating because I know it did work 3 days ago and now it is not. Any ideas would be appreciated.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/09/10 01:13 AM (15 years ago)
Hmm... The symptoms you describe are exactly like I've heard literally dozens (maybe hundreds?) of times. The location markers show but the map tiles do not. And, like I mentioned, it's been fixed in all cases Im aware of with the API key's provided by Google. I'm not sure of your development environment but this could be possible: a) You use a real device, not a simulator, to test your application. You're in Debug Mode on your phone so Eclipse will install your app. All works well. b) You're happy with your app and put it in the market. You continue to use it, maybe even overwriting the installed version on your phone with the Market version. All continues to work. c) Another person downloads your app from the market and the maps don't work. You're convinced that they did work but in actuality they only worked on your phone, not anyone elses. This is just a possibility I'm posing, it really could be more than that but this has happened to lots of folks. Aside from making darn sure you're compiling with the right API key info, I'm not sure what else to say? Maybe toss the old keys and re-configure them? It's a strange process to make them, I remember using the command line with different commands for Debug and Release. It's been awhile but I do remember it being crazy and not intuitive. It's all about Signing your app with a Proper Certificate. Signing is different than the keys themselves but it is important to understand the relationship between your authorized Google API keys and the signed code (vs. unsigned code). I'm guessing you have already seen this: http://code.google.com/android/add-ons/google-apis/maps-overview.html#sign and this: http://developer.android.com/guide/publishing/app-signing.html Check them out if you have not. If you have, I'm kinda out of ideas?
 
Gasguzziler
Aspiring developer
Profile
Posts: 53
Reg: Nov 24, 2010
Seattle
530
like
12/09/10 10:52 AM (15 years ago)
well I found the problem which had nothing to do with signing or my api key it was in the screen_locationmap.xml file it was pointed to the debug key. I just had to change it to android:apiKey=@string/googleMapsAPIKeyRelease and now the maps work. you might want to put that in the little how to, such a simple fix but such a headache to figure out when I thought it was another problem. [edit]the path to the file is res/layout/screen_locationmap.xml
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/09/10 11:12 AM (15 years ago)
This is huge and SUPER helpful. Hope you didn't have to go through too much pain (I know you did and appreciate it). Lots of folks will benefit from this most basic 'discovery' Cheers.
 

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.