I'm trying to find out I way to send push notification over notifications hub in azure mobile services to windows phone users. I tried several ways like this. But there's no sent message.
hub.mpns.sendToast("PushChannel", template, sendComplete);
Registration to services in wp I done like this:
var channel = HttpNotificationChannel.Find("cQuestPushChannel");
if (channel == null){
channel = new HttpNotificationChannel("cQuestPushChannel");
channel.Open();
channel.BindToShellToast();
}
string[] tagsToSubscribeTo = { "xxx" };
channel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(async (o, args) =>
{
var hub = new NotificationHub("***", "***");
await hub.RegisterNativeAsync(args.ChannelUri.ToString());
});
This registration works fine when and I can send test notifications over debug in azure.
What I am doing wrong?
Beside that, how to add some tag in function for sending notification?