I hope that I can be clear; I know there are a lot of threads on the Google Map API, but I have exhausted my brain trying to fix my problem with the maps. Please tell me what I have wrong here.
I understand there are two Google Map API keys.
1) API key, for a market published app. Maps will appear once the app is published.
2) Debug API key, only works on emulator or side loaded to the phone for testing.
My partner and I are working on an app together from different PC’s. We each have our own debug api key.
1) He sends his app folder from his .android folder
2) I drop the files into folder in my .android folder
3) I import the project into eclipse
4) Replace his API key with mine.
5) Run application
He gets maps displaying on his application, but I do not. I get the gray grid.
Do I need to build a new APK of the app before the maps will appear? Does this new APK have to be created exactly like he did his?
Does the path to my APK need to be in the same folder as my keytool.debug?
How does the fingerprint relate to the APK?
Please clarify, we are stumped.
The maps API key is linked to the keystore which was used to register. You will need the debug.keystore that was used to register for the API key. Here are some quick instructions I found on how to do this.
Sharing one keystore is much easier than changing the reference to a new maps API key every time you make a revision. I'm not sure why your method isn't working though.
Related
Okay, so here is my problem:
I made a little app for myself that uses the Maps API from Google. I followed the instructions on how to put the API key in the app and all that. I make my app, run it on my phone (via USB debugging if that's important) and it works just fine. Now, out of fun, I put the app on Google Play Store (for some of my friends and family to use it idk), and all of a sudden, the app doesn't work. What happened was, the map wouldn't load (as if i haven't put in the API key). Then I uninstalled the app, tried running it with USB debugging again, and the same thing happened. So I put in the new API key, and it works just fine. Uploaded the version 2 in the Play Store, same problem and the same situation. How do I fix this?
I will provide any additional information that you need.
Check if you've entered your API key within the google_maps_api.xml file in the release directory (/app/src/release/res/values) just like in your debug directory (/app/src/main/debug/values).
Then, if you have API key restrictions make sure that you are using right certificates for the debug and release builds. You can get your debug and release certificates by following the steps given on Google Maps SDK for Android documentation
I hope this helps! Goodluck on your project
I am doing some modification in an existing apk that i got from my client to modify. I have decompiled application using apktool, changed some resources (like some strings from strings.xml) and recompiled/built it again using same tool. Then I signed using one_click_signer tool that I found somewhere of the google.
But when I install it on my device then google maps does not work anymore as it was working with original apk on the same device.
I have searched a lot about this but did not got any solution.
I reviewed this link and many more and come to conclusion that I need to sign the apk with same key that was in original apk.
So can anyone please tell me:
how can I sign the apk again with the same key and make map work?
or is there any other way to make maps work properly?
Solution That I found and worked for me:
Thanx for
#apmartin1991's answer . .
I created a google api console project and got got the generated key.
then I replaced that key in android-manifest.xml file and resigned the application.
It worked.
You will need to contact your client to get the .keystore file so you can sign it with the same key OR you can sign it with your own key and allow your key to be used with google maps, You can do this from the Google API console.
However if your clients app is on the appstore and you want to update that you MUST use the same key or it will be impossible to update it.
You need .keystore file to use the same key. If you dont have .keystore file you need to generate a new one and register a new key in google maps console.
You have all the official instructions here.
Since Google moved to android map API v2 you have to connect your SHA1 key with a packagename. On the page it says 'packages' in plural but i can't seem to find out if and how it is possible to connect to package names to the same account
I would like to develop application with both 'com.foo...' AND 'com.bar...'
Do i really have to use the same package names for all my applications? or create new keys for each project?
Thanks for helping me out
I think you can use the same for both. Since, the API key is already stored in your debug.keystore in the .android folder. But if you want to publish your app in the play store officially. You may have to make an another one since they didn't support the same keyvalue for two apps.
Ben dubugginge my application and trying to make new ones...
You have to create one key for each project. giving you the ability to see statistics for each application.
But you can use the same debug keystore (created when installing the sdk?) to create as many keys as you need.
Go to the Google Api Console and click on the "Create new Android key..." button.
There you can enter several SHA1-package combinations, like this:
A5:5C:9F:45:BA:62:04:53:37:E4:A4:0D:CE:D5:2C:0B:99:B8:CE:10;com.example.app1
A5:5C:9F:45:BA:62:04:53:37:E4:A4:0D:CE:D5:2C:0B:99:B8:CE:10;com.example.app2
A5:5C:9F:45:BA:62:04:53:37:E4:A4:0D:CE:D5:2C:0B:99:B8:CE:10;com.example.app3
If you generate a key for this text you can use the same key for all three apps above.
I am working on an Android project with a few others that utilizes the Google Maps API. The problem is, currently, I am hard-coding my debug API key as an attribute on the MapView element. Since my debug key only works on my machine because only my machine has the keystore tied to that key, what's the best way that I can work with my project partners on getting Google Maps set up properly? It would be horrible if we had to manually change the hard-coded debug key each time we wanted to get it to work on our own machines.
Also, if this is necessary information, not all of us are using Eclipse.
Since my debug key only works on my machine because only my machine has the keystore tied to that key, what's the best way that I can work with my project partners on getting Google Maps set up properly?
Copy your debug.keystore file between those partners.
This cannot be impossible: We have four developers on an android app that uses the google maps api. We have generated a maps key that works for the one who generated it. All the others, however, see a tiled MapView without the actual map. Since my debug.keystore was used to generate, I was suspecting that the others need the same keystore. So I moved it into the repository so that everyone has a copy of it now. Then, everyone pointed eclipse towards that keystore using the custom keystore setting in Android->Build. This still does not work. What do we have to do? Surely we don't have to each use our own key and keep replacing it after every pull?
This site (and the web in general) contains tons of information on Google Maps API keys, but none answered my question unfortunately.
In year 2013 for V2 you can include as many keystores app as you like. For me it was debug and production keystores. Just follow process described here (this is a common process). When you create Android Key in Google API Console specify each fingerprint;package.name per line. E.g.:
BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example
94:66:06:01:12:27:AC:39:BB:44:90:41:40:86:88:3D:96:A7:99:A9;com.example
That's it! Now you have 1 API Key for 2 keystores.
Rather than trying to point Eclipse to a different keystore, just replace your local debug.keystore with the shared copy.
In https://console.developers.google.com/?hl=IT, where your app is registered and where one of the teammates has created the key for the first time, first of all you have to go to your project. Then select your key and, between the options of the key, choose "No restrictions". Now you all can see Google maps in the app working.