1
votes

Using Azure Notification Hubs, I can filter tags per user so I only send notifications to the specified individual. Does anyone know a way to filter this also on the device identifier?

i.e. my tag expression string sent to the notification hub would be "thisUserId && !thisDeviceId"

Do I have to just create another tag for the device id when registered? Or is there a simpler way?

Basically I am trying to use push notifications in a 'push to sync' style for a user's devices, so I don't want to notify the device that just sent the change that there are updates to pull.

1

1 Answers

1
votes

Essentially yes, you do. I don't think there is a unique device ID generated that you can use when using Notification Hubs.

One option is to use the device's push identifier (channel URI for WinStore/WinPhone, Token for iOS, RegId for Android) as a tag. Then you can say "thisUserId && !thisPushIdentifer". This way you don't have to generate a separate value specific to the device (always an option though if you don't want to use the push identifier).