1

I have 2 apps that use GCM everything works fine if i have 2 different projects, is it possible to have one API key for many apps ? I have read this thread : Android GCM: same sender id for more application

it is written that it is possible,but i am trying to understand how is it possible because when you register to GCM Google asks for a package name,and every app has different package name .

How can it be accomplished?

edit:requiring me to enter Android package name enter image description here

Thank you

Community
  • 1
  • 1
Maxim Toyberman
  • 1,464
  • 13
  • 34
  • 1
    I think , it is not possible. You read too old answer. Lots of processes changed by google. In 2012 only enable the GCM service from google console with associated account enough and single project associated with account. But currently you must create a project to get the GCM sender id with your package name.@ELITE you are right, but how will you get the sender id,how will you get the configuration file? – USKMobility May 03 '16 at 09:02
  • the configuration file is the problem i think,because it is different projects. – Maxim Toyberman May 03 '16 at 09:14

1 Answers1

0

You don't have to mention package name while creating GCM Server key. What you need is

  • GCM Server key and the domain name from where you have to send notifications.

  • Project Number for which you have to register device.

This registration number if different for different applications as mentioned here

Registration ID - which is implicitly linked to the package name of the app + device where it was generated.

Community
  • 1
  • 1
ELITE
  • 5,517
  • 3
  • 16
  • 24
  • just tried to create the project without mentioning the package name but it is not possible.@ELITE – Maxim Toyberman May 03 '16 at 10:15
  • You **don't have to mention package name** while you're creating **key for Server**...If you're creating **android api key**, you've to **mention package name**. – ELITE May 03 '16 at 10:20
  • ok,so if i have one Server key already,i don't have to create another one as i understand,but what about the configuration file?i can't use same configuration file for both applications. @ELITE – Maxim Toyberman May 03 '16 at 10:24
  • I have created a key just now,but what about the configuration file ? i use the same for 2 apps ? .@ELITE – Maxim Toyberman May 03 '16 at 10:29
  • I was creating GCM Notification from old method..Reference from [here](http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/) – ELITE May 03 '16 at 10:33