Sydney
Sydney

Reputation: 45

Changing Android API Key for GCM

I have inherited a GCM application to send messages to android phones. We have an Android API Key set up that may have been compromised. I would just like to ensure that I change it in a way that doesn't break the apps that are currently running.

I think what I do is:

  1. Create a new Android API Key here: https://console.developers.google.com/project/my-project-name/apiui/credential
  2. Delete the existing Android API Key

As I understand it from the docs, when I create my new API Key from the last apk generated, the SHA1 I used to generate it, along with the package name, should match up to my already-deployed android apps. I should not need to re-upload an apk.

Is that correct?

Thanks!

Upvotes: 0

Views: 520

Answers (1)

kaho
kaho

Reputation: 4784

Yes and no.

YES, if you are using OAuth 2.0, which depends only on the SHA1 and package name;

NO, if you are using API key, which usually require you to place your key in your manifest file.

Upvotes: 0

Related Questions