phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

Docs are unclear #2657

Open bpowell15 opened 5 years ago

bpowell15 commented 5 years ago

Expected Behaviour

for the docs to make sense

Actual Behaviour

they are unclear in areas



  "cordovaPlugins": [
    {
      "locator": "phonegap-plugin-push"
    }
  ]``` 

where does the sender id go? the cordova section of my package.json looks like this ... 

```"cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-opentok": {},
      "cordova-plugin-screen-orientation": {},
      "cordova-plugin-dialogs": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-native-ringtones": {},
      "hrs-twilio-client-phonegap-plugin": {},
      "cordova-plugin-android-permissions": {},
      "cordova-android-support-gradle-release": {},
      "phonegap-plugin-push": {
        "ANDROID_SUPPORT_V13_VERSION": "27.+",
        "FCM_VERSION": "11.6.2"
      }
    },
    "platforms": [
      "android",
      "ios"
    ]
  },```
fredgalvao commented 5 years ago

https://github.com/phonegap/phonegap-plugin-push/blob/532be4b4549d893221e35f72d320c1678a2b29f4/docs/INSTALLATION.md#installation-requirements

As of version 2.0.0 the SENDER_ID parameter has been removed at install time. Instead you put your google-services.json (Android) and/or GoogleService-Info.plist in the root folder of your project and then add the following lines into your config.xml.

Which part of that exactly is unclear?

bpowell15 commented 5 years ago

My issue had to do with setting voip true, turns out the code path does not allow for setting up voip and fcm at the same time

bpowell15 commented 5 years ago

But also to show you why its confusing.... screen shot 2018-12-18 at 3 07 31 pm

fredgalvao commented 5 years ago

@macdonst can we remove those mentions of SENDER_ID? Or are they still valid for ionic on 2.+?

macdonst commented 5 years ago

@fredgalvao I'm pretty sure we can remove that now.

ppetree commented 5 years ago

The docs are in horrible shape... always have been. Even now (as a for instance), you say things in the plugin docs (i.e. data vs notification) where you specify one behavior and the FCM docs specify another behavior. I've been screwing around with custom sounds for days and still can't get it to work but had it working on 1.8x and GCM just fine.

codesundar commented 5 years ago

I have updated my push notification article on my site using phonegap-plugin-push. You can check my tutorial here: Phonegap Push Notification Tutorial