13

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.

enter image description here

So my question is: where do I have to put this file?

blackwolf
  • 927
  • 2
  • 11
  • 23
  • Is this new way to configure your app for `GCM` ? – M D Jun 08 '15 at 07:49
  • Yes this is new way. I have a same problem. is your problem solved? please, let me know solution. – Mohini Jun 08 '15 at 12:18
  • I tried this new in Android Studio, and it works fine. I think in the eclipse you can just put the json file in the `root directory` such the directory has `build`, `libs` and etc... – bjiang Jun 08 '15 at 19:47
  • @bjiang How did you successfully do this in Android Studio? I'm not even able to get the file. – Mike James Johnson Aug 06 '15 at 23:29
  • 1
    @MikeJamesJohnson just to this [page](https://developers.google.com/cloud-messaging/android/start), go to step 2, click that button and follow the steps. – bjiang Aug 06 '15 at 23:47
  • @bjiang Ok, where exactly should I copy the file? It says the app directory. So can I put it within my res or main folder? – Mike James Johnson Aug 06 '15 at 23:51
  • @MikeJamesJohnson I put in the `app` folder. If you can open a new question, I can show you the image:) – bjiang Aug 06 '15 at 23:54

1 Answers1

3

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? :)

blackwolf
  • 927
  • 2
  • 11
  • 23