Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable GCM for an application while uploading to Google Play Store

I am uploading an application to Google Play Store in which GCM is implemented.

How to enable GCM for that applicationw while uploading to the Google Play store? There is a section called "Enable Google Cloud Messaging Stats".

I am getting this error when trying to ling GCM Sender Id:

Invalid GCM API Key or C2DM Client Login Token (Bad Key).

Can anyone please explain what are the steps to enable GCM for an application while uploading to android market.

like image 421
android.fryo Avatar asked Dec 13 '12 11:12

android.fryo


2 Answers

(This question is quite old, but I hope this answer help others in the future.)

You need to use the API key, it seems you copy the Sender Id itself. First, after creating a project in Developer Consol you need to enable the API:

  1. In the sidebar on the left, select APIs & auth.
  2. In the displayed list of APIs, turn the Google Cloud Messaging for Android toggle to ON.

Next, obtain an API Key

  1. In the sidebar on the left, select APIs & auth > Credentials.
  2. Under Public API access, click Create new key.
  3. In the Create a new key dialog, click Server key.
  4. In the resulting configuration dialog, supply your server's IP address. For testing purposes, you can use 0.0.0.0/0.
  5. Click Create.
  6. In the refreshed page, copy the API key and use it in the Google Play Developer Console

More info

like image 118
Amin Avatar answered Sep 18 '22 06:09

Amin


Make sure that your Project id or sender id is valid.This is a unique id for project(the same id for client and server).

In your case you might be using project id of another project.

like image 32
dd619 Avatar answered Sep 19 '22 06:09

dd619