Open elliotstokes opened 9 years ago
Getting exactly the same problem
Have you tried using the send()
for low level notifications? That's working fine for me.
Yes, This is the way I am sending the notifications right now. I think however that the problem might be with the channel obtained by the client app. In out case the client app was written with phonegap (cordova) and using the push plugin which might be obtaining mpns channels. In fact if I use the same channel with the mpns module, it works correctly. I do not have a lot of experience with push notification as this is the first app I am writing that supports them, but this would be my guess.
What's the format of the channel URI? The WNS one should contain notify.windows.com
. The MPNS one is s.notify.live.net
. If you use a MPNS URI with WNS, it will work but the result might be unexpected.
In fact the format is: http://s.notify.live.net
And thats why I ended up using mpns after a brief research. Also, I was wondering if the wns channel shouldn't be https and not http?
In fact it is.
I am also using the cordova push plugin. I thought that mpns was going to be retired to assumed I needed wns. Waht mpns module are you using https://github.com/jeffwilcox/mpns? or another.
Yes that is the one I am using and it is pretty straightforward to use. The limitation of working with mpns is that without a TLS certificate, there is a limit of 500 push in a day. Hope that helps.
Great plugin. We are currently working on getting wns notifications working for our app and are having a few problems.
When the notification is sent we receive the notification when the app is open and the toasts are coming through as raw. If the app is closed then we see no notification at all.
To send Im using var options = { client_id: settings.push.windows.clientId, client_secret: settings.push.windows.clientSecret
}; wns.sendToastText02(channel, { text1 : title, text2 : message }, options, callback); };
on the client it calls the httpnotificationreceived event not the toastnotificationreceived event.