0

i have two projects in android studio. the first one is called "test1" and the second is "test2". i want to use google cloud messaging to communicate with each other. my question is, do i need to use the same "google-services json file (downloaded from google website) on both projects, and also the same project id? or use diffrent google-services files?

Bolandian Eran
  • 211
  • 1
  • 4
  • 19

2 Answers2

1

you have to use two different json files, because first project package name and second project package name are different. Google will generate server key depends on package name.

Mahabub baig
  • 178
  • 1
  • 13
0

I do not understand the communication word between two different projects. (You mean example to say Facebook send push notifications to Twitter ? )

If you have two different Projects, Yes you need two google-services.json files because both projects have different package names and Sender-ID(i.e Project ID in google console )

If you want communication between two application's (not two different projects), then you can simply use ONE google-services.json file

Note: With out google-services.json file also Servies works well in production but not after releasing your app in public.

Also read What is google-services.json to get clear idea of it.

Community
  • 1
  • 1
Kathi
  • 1,011
  • 1
  • 14
  • 28