Closed TimKolberger closed 7 years ago
Hi,
it is not possible to unregister the device
Do you mean that 'success' callback is never returned?
console.log('failure', status); // -> status = null
pushNotification.unregisterDevice
will never return a 'failure', it always returns 'success' in any case.
The PluginProxy function unregisterDevice always returns an error, because this.service.unsubscribeFromPushes()
needs two parameters (throws exception).
pushwoosh-phonegap-plugin/src/windows/PushwooshPluginProxy.js:44
unregisterDevice: function(success, fail) {
this.service.unsubscribeFromPushes();
success();
},
I edited the PluginProxy to use the success and failure handler:
EDITED: PushwooshPluginProxy.js:44
unregisterDevice: function(success, fail) {
this.service.unsubscribeFromPushes(success, fail);
},
In either way, the unregister function does not have any effect.
any news on this issue?
Hi,
Callbacks are working fine with a native plugin and devices are being unregistered. With WinJS these callbacks are not being called (due to WinJS mechanics, and it is out of our control).
We have tested it and unregisterDevice
is indeed unregistering a device as expected. The failure callback issue actually known for some time, so unregisterDevice
for Cordova Windows plugin always calls success()
and at the moment it is the only possible option.
Environment: Cordova 4.2 with the latest pushwoosh-phonegap-plugin on the windows platform. It is possible to register the device, and to receive push notifications (see #219 ) But it is not possible to unregister the device: