I'm trying to implement the new GCM client
on Android.
At one point, you have to enable Google Services
for the app. After enabling Cloud Messaging
you have to download the file google-services.json
and put it in the app/
or mobile/
directory. The problem is that in my eclipse project this directories doesn't exist.
So my question is: where do I have to put this file?
The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).
The general answer is yes, the google-services. json is safe to check in to your repo and is something that should be shared among engineers on your team. The JSON file does not contain any super-sensitive information (like a server API key).
There is no way to use two google-services. json files in a single Android app. The file name is the same between them and they need to be in the same location. So one will overwrite the other in that case.
It seems that for eclipse that file is not necessary. I've managed to make the client work without it.
Just follow the steps from Implementing GCM Client on Android and skip the part with the google-services.json
file.
UPDATE: For Android Studio the instructions are pretty clear. The file must be put in the app/ directory of your project: https://developers.google.com/cloud-messaging/android/client#add-config
P.S. Any vote down should go along with the reason specified in a comment, or not? :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With