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?
2 Answers
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.

- 177
- 1
- 13
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.
-
alright thanks! you answered my question. just another question,i can send notification from "test1" to "test2" with sender id? – Bolandian Eran Apr 15 '16 at 17:36
-
but if they are projects? – Bolandian Eran Apr 15 '16 at 19:02