Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android GCM: same sender id for more application

Is it possible to use same sender id for more applications? Now I have 18 application (different language and some functionality) which use same backend. Now I am implementing push notifications with GCM. But backend team preffer to have only one google project - SENDER ID for all applications. Did anyone try it? Is this scenario possible? What are the drawbacks?

Thanks

like image 299
pcu Avatar asked Jul 19 '12 06:07

pcu


People also ask

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.

Is GCM and FCM same?

Firebase Cloud Messaging (FCM), formerly known as Google Cloud Messaging (GCM), is a cross-platform cloud solution for messages and notifications for Android, iOS, and web applications, which as of June 2022 can be used at no cost.

What is difference between GCM and FCM in Android?

FCM is a cloud platform that provides messages and push notifications for operating systems- ios and Android, and websites as well. Google Cloud Messaging is a messaging service that enables the message transfer from server to clients apps.

How to send GCM from server to Android app?

To be able to send GCM from your server to your app, you need a GCM SenderID and a server API key. In this tutorial you will see how to generate these two Strings for your Android app.

How to integrate GCM with Android push notifications?

Implement an Android Client app to register with GCM, send the registration id to your push notification server and manage the notifications sent from your server via GCM. Implement a server side API to get and store registration ids from the client app and optionally provide an Admin panel to send push notification from.

How do I Find my senderid number on my GCM?

Now go to the “Home” page from the left panel and there you will see the SenderID for the Android side of your gcm. As shown in the screenshot, your senderID is a number like “922435504281”.

Why can’t I send messages on FCM and GCM together?

This presented a very tricky situation. FCM and GCM had different sender ids. So, we had to use one token for sending messages to our old users on GCM and another one to send messages to new users on FCM. What we wanted was to send messages on one key, and receive messages across our entire user base.


1 Answers

Developers are perfectly welcome (and encouraged) to use the same sender ID / API key for all of their apps.

When you send a message, you specify a registration ID, which is implicitly linked to the package name of the app + device where it was generated. Only the app which requested the registration ID will receive your message.

Source: I'm a member of the Android team at Google.

like image 91
Trevor Johns Avatar answered Oct 18 '22 00:10

Trevor Johns