Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android GCM project id, which one?

I returned to looking at the Android GCM service after a break and got confused regarding the project ID as described in the 'getting started' guide:

Click Create project. Your browser URL will change to something like:

https://code.google.com/apis/console/#project:4815162342

Take note of the value after #project: (4815162342 in this example). This is your project ID, and it will be used later on as the GCM sender ID.

Let's call this ID_1

I'd forgotten that my project ID was there to see on the Console API's link in my browser, so thinking I didn't have a project ID, I registered the project through the Google API console and clicked the 'register' link. I got to choose an ID, so now when I look at the console dashboard for my project I get to see something of the form:

Dashboard

Project Summary Name    MYGCMProject
Project ID              i-picked-this-id-2-11b-36
Owners                  me@myemail - you

Let's call the 'i-picked-this' value ID_2

So my question is which value (ID_1 or ID_2) do I use in the the client's registerClient code

GCMRegistrar.register(this, PROJECT_ID); 

?

If it's still ID_1, what use is the ID that I chose when I registered the project via the API console?

(I've seen this question Android GCM- Register Id and Project Id which was the closest similar one, and it doesn't shed any light at all on my query)

like image 402
NickT Avatar asked Oct 08 '12 11:10

NickT


People also ask

What is GCM ID?

Google Cloud Messaging (GCM) was a mobile notification service developed by Google that enables third-party application developers to send notification data or information from developer-run servers to applications that target the Google Android Operating System, as well as applications or extensions developed for the ...

Is GCM deprecated?

On April 10, 2018, Google deprecated GCM. The GCM server and client APIs were removed on May 29, 2019, and currently any calls to those APIs can be expected to fail. Google Cloud Messaging, deprecated April 10 2018, has been deactivated and removed from Google's APIs.

What is GCM service on Android?

Google Cloud Messaging (GCM) for Android is a service that allows you to send data from your server to your users' Android-powered device, and also to receive messages from devices on the same connection.


2 Answers

4815 1623 42 this one and it should be **twelve digit**

find it from URL = https://code.google.com/apis/console/#project:4815162342 <---

like image 185
MAC Avatar answered Nov 02 '22 09:11

MAC


There are two ways to identify your project: the "project number" and the "project ID."

The project ID is an optional identifier that you can assign to your own project. It's used by services like Google Cloud SQL when they need access to your project's resources.

You don't need to assign your project an ID until you enable one of the services that requires an ID.

like image 2
Arnoldas Bendoraitis Avatar answered Nov 02 '22 11:11

Arnoldas Bendoraitis