-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUERY] How to send a notification to a single user/device #138
Comments
@eric-labelle I'll update the documentation for the SDK to be more in line with the Apple SDK which has this information. To target a user, use the tag To target the push channel directly, use the Direct Send capability of Azure Notification Hubs with the given device token. |
oh wow, ok! never would have guess this one for userId. Thanks For the Direct Send, that's not in the Azure Portal, only through REST API? There is only a "Test Send" button in the Azure portal. |
@eric-labelle correct, Direct Send is through the REST API directly. The portal is just using the normal targeted send. You can, however, if you know the Installation ID, target it that way through the portal |
@mpodwysocki I just tested both. Works well. Im curious though what is the |
@mpodwysocki are you able to send to a group of users using |
I my payload looks like this: where does |
@frankfuu Yes, you can set the same userId when registering those devices, and if you send a notification with the tag "$UserId:{VALUE}", the notification will be sent to all those devices. Note that conceptually, UserID is meant to be used as an identifier for all the devices that belong to a single user. So a better way to send a notification to a group of users would be to add a unique group tag when registering the devices that belong to a group. And then, when sending a notification, you can specify the group tag that you want to target for that notification. More info on using Tags with ANH: https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-tags-segment-push-message |
@ljunquera You will need to provide More info on using Tags with ANH: https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-tags-segment-push-message |
Query/Question
Using the method
NotificationHub.setUserId()
from the Android sdk, how can we send a notification from the Azure Console to that user? There's only a "Send to Tag Expression" field but using the userId there won't work obviously. Just curious what this setUserId is used for if there is no way to send a push notification to only this user.On an additional note, it would also be useful to be able to send a notif directly to the pushChannel (which is kind of the pushToken from what I understand in ANH)
Also, is there a way to see registered devices/users/tags in the console? can't find this anywhere.
Setup (please complete the following information if applicable):
Information Checklist
The text was updated successfully, but these errors were encountered: