CrossGeeks/AzurePushNotificationPlugin

How to send notifications to a single device?

Closed this issue · 4 comments

Thank you for your great plugin. Sorry if I have missing some annotations but I have not idea how to add this filter.

You could register every device with a unique tag and then send a message to the notification hub with this tag. Then only that device will receive the message. If you send without a tag every registered device will receive the message

Thank you michelmoorlag, you suggested "You could register every device with a unique tag" but I don't see any method (Register?) or AzurePushNotificationManager.Initialize where I can add the Tag. Sorry for the elementary question

@gmbertolotto After initialization you need to register the device where you can give a string array of tags: await CrossAzurePushNotification.Current.RegisterAsync(new string[]{"crossgeeks","general"});
See the documentation.

thank you again michelmoorlag, now it's all working.