Google Maps Api Key with already created keystore - android

I am adding Google Maps into my application for the first time.
I have gone through several tutorials for getting the Google Maps API key for deployment.
But every where the first step indicated is to create a debug.KeyStore OR the create our own application keyStore
Then copy our SHA1 and paste it with the package name while generating API Key.
My small doubt is:
I am giving an Update of my application and added Google Maps in my version 2.
I do have the keyStore of my application that is already live on the play store.
So what do i do now as I already have my key and have to use the same key for the Update.
I dont want to mess up things at the time of deployment.
Please Help.

You must be use that keystore file which is already within the application on Google Play Store. Because if you create new keystore file then you have to regenerate process again.
So you have to go to with your old one keystore file.

You should be using the keystore that you already have. Basically you have no other option.

Related

Google maps does not work after resigning an apk

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.

How to check if my Android release.keystore is correct?

I received a release.keystore from the developer that was working previously on the project.
I created a custom debug.keystore based on release.keystore to test the app.
Some of the functionality of the app is broken comparing to the app on the Google Play which makes me think I might not have a valid key. For example Maps don't display correctly (gray square).
Is there a way to find out if I have a right key, that the previous app was uploaded with?
thank you!
don't create a debug key from it. Just sign the app with the regular key and then test it.
I believe that the maps API is tied to your release key so it will not work in your app unless you sign with your release key

Does a new Debug Keystore mean a new Map API Key?

I just deleted my Debug.keystore because an application displayed an error on the project file which I couldn't find. After deleting the keystone my app works fine except the fact that the map doesn't display at all - only the blank grey boxes that precede the loading of the map.
Does this mean I have to get a brand new Map API key because the application signature has changed?
P.S. The app worked fine before this therefore I have all required uses-library permissions etc.
Thanks
EDIT
After some snooping about I have answered my own question but when i tried to get a new API key it tells me that the Keystore File doesn't exist. I thought that when it gets deleted another one is rebuild/recreated automatically. What gives?
There is a debug keystore and a keystore for your signed app. The keystore file is in the hidden .android directory (on a Mac, inside the user directory).
Google Maps only works with a SIGNED APK. The debug keystore is not relevant then.
Create a signed APK. Make very, very sure to make backups of that keystore you create for this APK; you can't publish updates to the Android Market unless they're signed using the same keystore.
Generate your hash from that keystore file, get your API key, and use that in the app.
Even then, if you just run your app straight from Eclipse, you will not see the map, only the gray area... you must load the signed APK onto your phone, install from that, and then it should work. Hope this helps!
Does this mean I have to get a brand new Map API key because the application signature has changed?
Yes. You used an MD5 fingerprint of your original signing key to get the Map API key. You will need to follow the same steps to register a new MD5 fingerprint and get the corresponding Map API key.
After some snooping about I have answered my own question but when i tried to get a new API key it tells me that the Keystore File doesn't exist. I thought that when it gets deleted another one is rebuild/recreated automatically.
It will be on your next build. Make sure you are looking in the right place.

How to put an Android debug keystore into a subversion repository and then getting Eclipse to use it?

In order to use the Google Maps API, Google requires the MD5 fingerprint of a keystore:
To display Maps data in a MapView, you need to register for a Maps API Key
Each Maps API Key is uniquely associated with a specific certificate, based on an MD5 fingerprint of the certificate
You can register multiple certificates under your developer identity
You can get a temporary Maps API Key based on your debug certificate, but before you publish your application, you must register for a new Key based on your release certificate and update references in your MapViews accordingly
We have multiple people who are going to be using the Google Maps API and we are using Subversion to track everything. It seems a lot easier if all the developers simply point at the same keystore but the Eclipse IDE doesn't seem like it has a way to point at more than one keystore and each developer works on multiple projects.
Is there a way to get Eclipse to use a keystore in the current Subversion repository without being a hassle (i.e. without having to change preferences all the time)?
Or should there be a new SVN repository dedicated solely to managing the debug keystore for all of our devs?
How are you doing this at your organization?
Basically, default debug keystore is stored in
/Users/{NAME}/.android/debug_keystore
Set SVN Repository and Checkout to the computer, which contains the file “debug.keystore”
In Eclipse, File->Preference->Android->Build.
Set “Custom debug keystore” to “debug.keystore” file in SVN Checkout Directory
http://chrislee.kr/wp/2010/12/31/share-google-android-api-key-in-eclipse-with-other-team-members/
It is easier if you add all developers debug keys to google-play-services and generate one Api key for all of them. Much more is complicated for all of developers to get debug key from repo and setup it in eclipse. Google Maps Api v2 for sure allows to add more then one SHA1;com.package.name lines to get one Api key.. (btw that is the way to do it..)
Puting maps key in string.xml resource file is probably the most unsecure solution. Apk can be relatively easy reverse engineered and the easiest files to read are resources (among those xml files)
Making repo just for debug keys is IMHO way to overhead...
maybe it is just me..but..
I hope this answer really helped you and others.. ;)
We ended up putting the Maps key into the strings.xml file and then referencing it that way. There are a couple of different ways to start a MapActivity in our application. So that makes it easy to go live when we are ready - just replace the key in the one location and then it is basically ready to submit to the Market.
We also set up a single Subversion repository whose sole purpose in life is to house the debug keystore and Maps API keys and anything else in the future that is keystore-specific. All of the developers now point at that single debug keystore from within Eclipse and the app works like a charm.

One Google Maps Key for multiple developers (Android)? Eclipse custom keystore?

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.

Categories

Resources