Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toast notifications coming through as raw. #14

Open
elliotstokes opened this issue Dec 18, 2014 · 8 comments
Open

toast notifications coming through as raw. #14

elliotstokes opened this issue Dec 18, 2014 · 8 comments

Comments

@elliotstokes
Copy link

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.

@joviol
Copy link

joviol commented Dec 22, 2014

Getting exactly the same problem

@matteocontrini
Copy link

Have you tried using the send() for low level notifications? That's working fine for me.

https://github.com/tjanczuk/wns#low-level-notifications

@joviol
Copy link

joviol commented Dec 30, 2014

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.

@matteocontrini
Copy link

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.

@joviol
Copy link

joviol commented Dec 31, 2014

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?

@matteocontrini
Copy link

In fact it is.

@elliotstokes
Copy link
Author

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.

@joviol
Copy link

joviol commented Jan 21, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants