2

I'd like to know if two applications installed in the same device could share the same token for GCM taking in to account that they will receive messages from the same server.

enter image description here

Thanks a lot

Aldridge1991
  • 1,326
  • 6
  • 24
  • 51

2 Answers2

3

No, it's not possible. Each application has to register separately to GCM, and will receive a different registration token from GCM.

Anyway, it doesn't make much sense (at least not to me) to send the same GCM message to two applications on the same device.

Eran
  • 387,369
  • 54
  • 702
  • 768
1
  • First of all you will not be able to install one application with same package name (com.org.app) in once device.
  • Secondly: When GCM creates token on based of the created application, it makes sure to take input as
    1) SHA1 Keystore
    2) Package Name
  • If SHA1 is same and package name is different, then different API keys should be generated from developer console

  • So to conclude, you will need to create different API key from developer.console.com by adding multiple API key in same project
  • Or create totally different project and create API key with new application package name


enter image description here

Sreehari
  • 5,621
  • 2
  • 25
  • 59