I need to send a push notification to mobile devices that have registered on my notification hub.
The hub is set up to allow windows phone, apple and android devices to register, and I have the appropriate keys and certificates in place. (According to the documentation!)
I can see that I have at least one of each type of device registered on my hub, and they have registered with a tag that I can use to send a notification to a specific device.
I am using C# and the latest release of the Microsoft.Azure.NotificationHubs namespace, version 2.16, as advised by the NuGet package manager.
I want to send a notification to a device that has registered using a tag.
The documentation says that I can send one message to the notification hub, and the hub will create a platform specific notification to forward on.
My question is what method do I use to send the data to the hub from the back end, and therefore, what parameters do I use in that method.
I am trying to use the SendNotificationAsync() method that takes a Dictionary and a string tag as parameters.
I don't know what to set in the Dictionary parameters, or in the properties of the Notification class , i.e. Body, ContentType, Headers etc. I cannot find any examples using these classes.
I know this namespace is new, but I can find no examples of how to use the methods.
Any help appreciated.
I know these have only just been released, but any help / guidance would be appreciated.