Xamarin debug.keystore on different PCs - android

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.

Related

How to handle Google API SHA-1 Certificate Authentication to allow multiple users?

For our senior project, four of my classmates and I have teamed up to build an Android app that uses Google Maps.
So far everything is going fine, but we have hit one issue that we are not sure how to work around.
When using the Maps API, you sign up for an API key that is assigned to the program we are creating. In order to authenticate the API key on the Google Developer console, it must be associated with an SHA-1 certification, which appears to be generated by our JDK. It would seem that, even though all five of us are working on the same project, we all have different SHA-1 certifications.
Is it possible for all of us to use a single SHA-1 certification for our project, even though we are on different computers and phones, so that we don’t need to go through the process of discovering each of our individual certifications and registering them?
How do we get around this certification issue once we are prepared to publish the app (or at least share it with our other classmates for testing)? Clearly I can not take the time register each of my 40 classmates’ certifications individually, and once we release this to the public there will be no way to do so. How does one get around this?
I’ve searched on the Google API documentation pages about this, and there is plenty of information about the API key, but surprisingly little about the SHA-1 certification, which is an equally important aspect of authentication.
I've also searched on this site and found similar questions, but most of them seem to involve user credentials (IE login and password). At this time, the only credentials we are using is a Facebook login (via the FB API) so I don't think that is relevant (though I may be wrong).
Thank you so much for your time and wisdom.
This is because the SHA-1 fingerprint is generated by the keystore used to sign the builds. The default debug keystore located in the android home directory is different on every computer. You can either add the fingerprints from all the the debug keystores you are using or share the same keystore file.
Sharing the same keystore can be easily be done by storing it inside the project folder and then referencing it with the gradle build file with the signingConfig. see example
The other easy solution is to add everyone's SHA-1 fingerprint in the Google Cloud console for Google Maps API project you have setup.

Sharing a debug key on an Android project that uses the Google Maps API

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.

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

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.)

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