I am currently utilizing the PushSharp library and have come across deviceToken in the sample code provided on this link.
Could someone kindly assist me on how to obtain this deviceToken? The PushSharp sample code does not clearly explain this.
apnsBroker.QueueNotification (new ApnsNotification {
DeviceToken = deviceToken,
Payload = JObject.Parse ("{\"aps\":{\"badge\":7}}")
Similarly, I am facing a similar issue with Android. How can I retrieve the Registration ID's?
foreach (var regId in MY_REGISTRATION_IDS) {
// Queue a notification to send
gcmBroker.QueueNotification (new GcmNotification {
RegistrationIds = new List<string> {
regId
},
Data = JObject.Parse ("{ \"somekey\" : \"somevalue\" }")
});
}
I am looking to send push notifications through my service layer which is built using webapi. Any suggestions would be greatly appreciated.