Android Google Maps API Key on 2 different machines not working? - android

I am making sure that I'm using the correct key and it works on my personal Vista machine at home, but not on my Mac OSX at work.
Both are using the exact same code base for the app in dropbox, also the keystore is in dropbox so I'm sure that it is the exact same key.
Does anyone know why this is the case? I don't really want to have to use different signing keys on different computers, this would mean that I will only be allowed to compile a signed release version from 1 machine.
Thanks in advance

You can create a new debug.keystore and share that between machines.
To use it in Eclipse, go to Preferences -> Android -> Build and set the Custom debug keystore appropriately.
You will have to create a separate keystore for the release key. And then you have to figure out how you want to ensure that the right API key is used at runtime. (There are several ways to handle this, but no good way as far as I can tell.)

Related

Xamarin debug.keystore on different PCs

I have added a google sing-in api into my xamarin.forms project. (I have done it according to this guide). And it works well, but there is another PC with this project, and SHA1 debug key on that PC is different from the key on my PC. So a google sign-in does not work on the second PC. How can I make it works on both PCs?
I guess the easiest way will be to use the same keystore on both machines. The guide you shared contains a detailed information on how to generate a keystore. Alternatively you can read this official guide.Once it is generated you will have to use this keystore to sign your apk.
P.S.: If you are completely new to Android I would highly recommend to get familiar with the signing concept and the official Android guide is the best place for this.

Is there a way to import debug keystore in Android?

We are using Android Studio and we are developing an app using the default keystore. The application is already being used while in development so all clients already have data in their devices.
We now would like to use an actual keystore. However, creating a new one would mean the clients cannot update the application - they would have to reinstall the application which means that they would lose existing data. Is there a way to go around this? Or can we import the existing keystore for release?
It is stored in ~/.android/debug.keystore.
On Windows, this will be something like C:\Users\Username.android\debug.keystore
However, I would advise not to do this, as the debug keys have an early expiration (at least they did with Eclipse, I haven't been able to find anything about Android Studio). Once this date is reached, there will be no option but to create a new key. It's definitely messy, but it'll be easier to clean up now rather than in a years time when you'll have even more users.
You should use the existing keystore itself. While generating the signed apk, You can provide the path to that keystore, keystore password, key alias and key password. This is the only way with which you can generate an updated version of the existing apk.

android api portability error

I have a little problem. I have created an android api that uses google maps(mapview) on my pc with eclipse and the android emulator. Everything seems to be running fine on my pc, but when I try to install and run the same api on my laptop everything runs great, except that when I navigate to the activity using the mapView, the map shows grey with grids on the screen and not as a map. Could the problem be, that because I am running the api on a different pc, I should create a new api key to use? In another topic, I have seen that a possible solution could be, to change the version of the java compiler to the one that the program was originally compiled. I tried this too to no effect. Any help would be useful.
The Google Maps API key corresponds to your app key, when running the app locally without signing it with a keystore the app is signed by the eclipse debug key (which is different for every computer), so you need to create a new API key for every debug keystore you're using. To sum it up, you need a different API key for each development computer and off-course another API key for your release keystore.
You need to share the debug.keystore between machines for the map to show on different machines while development.
For that in Eclipse, go to Preferences -> Android -> Build and set the Custom debug keystore appropriately which u are using on your pc to view Google Maps.
Or else create a different API key for each development computer.
You will have to create a separate keystore for the release of the app.

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