Pushwoosh Push Notification Configuration issue #227

Closed
amitparrikar opened this Issue Dec 1, 2016 · 1 comment

Projects

None yet

3 participants

@amitparrikar
amitparrikar commented Dec 1, 2016 edited

I am trying to use Pushwoosh plugin pushwoosh-cordova-plugin. I followed the documentation given here

I am trying to register a mobile device through my backend service. i.e. is by using /registerDeviceAPI

So my question is:

1) Do we need the following piece of code? What it exactly do?

pushwoosh.onDeviceReady({
appid: "PUSHWOOSH_APP_ID",
projectid: "GOOGLE_PROJECT_NUMBER",
serviceName: "MPNS_SERVICE_NAME"
});

2) Can we only have the following piece of code and receive mobile push notification from my notification provider i.e. Pushwoosh ?

document.addEventListener('push-notification', function(event) {
var notification = event.notification;
// handle push open here
});
@wfhm
wfhm commented Dec 5, 2016

Hi,

  1. Do we need the following piece of code? What it exactly do?

Yes, this is the method responsible for initializing Pushwoosh plugin, without it the plugin won't work.

  1. Can we only have the following piece of code and receive mobile push notification from my notification provider i.e. Pushwoosh ?

No, this is not enough. All the required steps to integrate Pushwoosh plugin are described in the following guide:

http://docs.pushwoosh.com/docs/cordova-phonegap

@viridanti viridanti closed this Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment