2 Replies Latest reply on Apr 5, 2017 7:15 AM by canados

    Trying to set up Push Notifications, what to do with google-services.json, etc


      I'm using the cordova-plugin-push-notification via npm in the app (in the config file). I also added folders and files as instructed under "Manual Installation for Android" here: node-gcm/README.md at master · ToothlessGear/node-gcm · GitHub , though I'm not sure that's needed with a PhoneGap Build installation.


      I've seen the instructions in the Google Firebase overview, and tried to follow them, but I can only go so far, as they talk about Gradle, etc. How do I follow through with PhoneGap Build?


      I'm stuck at what to do with the google-services.json file I generated. It says:

      The Google services plugin for Gradle loads the google-services.json file you just downloaded. Modify your build.gradle files to use the plugin.


      It also says earlier in the instructions to put google-services.json in the root of your app, which I did.


      I've entered the keystore, etc, and Firebase seems to have found my app. Now what?


      There's also some files in the folders and files I mentioned at the top that have spaces saying "REGISTRATION_ID_GOES_HERE" and I'm not sure where to find that.


      I'm afraid I foolishly already published the app, not knowing I had to do all this for push notifications. I hope that doesn't screw it up. I can update it in Google Store Developer with the json file (and the other folders I mentioned above) in there, if that's needed.


      If I understand correctly, I also need to set something up on my own server (which I have for our website) to push the notifications. I could use a pointer in the right direction to get that started too.


      It's all very confusing, and I'd appreciate any help! Thanks!

        • 1. Re: Trying to set up Push Notifications, what to do with google-services.json, etc
          jamminjames01 Level 1

          I know it's a very newbie question, but still looking for answers here.


          It's been getting a lot of views, so it seems there are others with the same problem. Can anybody help?


          I'm all set up in Firebase, and as I said, it found my app, so it seems like it should work. But notifications are not getting through to the app as installed from Google Play.


          What's the best way to set up Push Notifications in PhoneGap Build?

          • 2. Re: Trying to set up Push Notifications, what to do with google-services.json, etc
            canados Level 1

            Hello jamminjames01


            I have also an issue of implementing Firebase ( for my, analytics )

            I have a solution for you in order to check if firebase is successfully initiated.


            you can open either ( DDMS or monitor )  / android studio

            In the logs, try to find FirebaseInitProvider: FirebaseApp initialization


            if it says successful you should be ok and receive the data in the firebase console.
            If it says unsuccessful well, you are in the same problem as me.

            I have been searching around and it seems the problem is the google_app_id, a value which is set by firebase and also by google-services and there is a conflict. I am trying to edit the res/values/strings.xml from the config.xml, so far no luck