I have created an Azure notifications hub and an API that allows users to register for notifications via the API. This all seems to work without any errors, but I cannot find a way to interrogate the notifications hub for registrations. Can some one tell me how to get a list of all current registrations? Ideally I would just do this in the Azure Portal, but I cannot see anything in there.
You just need to log into Azure portal, choose your App Service, then click "Settings > Push" to configure your Notification Hub. For your Xamarin.
Tag expressions enable you to target specific sets of devices, or more specifically registrations, when sending a push notification through Notification Hubs.
Azure Notification Hubs provide an easy-to-use and scaled-out push engine that enables you to send notifications to any platform (iOS, Android, Windows, etc.) from any back-end (cloud or on-premises). Notification Hubs works great for both enterprise and consumer scenarios.
Similar to other entities, Notification Hub operations are allowed for three security claims: Listen, Send, and Manage. Notification Hubs accepts SAS tokens generated with shared keys configured directly on the hub. It is not possible to send a notification to more than one namespace.
In Visual Studio, Server Explorer -> unfold your Azure subscription -> Notification Hubs -> find your hub and double click.
In opened window, there is a Device Registrations tab. You can find all your subscribers there.
In the Azure portal, you unfortunately cannot view your subscribers. But you can send a test broadcast message (just don't specify any tags) and see subscribers below in the Result area.
By the way, if you subscribed any devices, then sent a push notification, but payload was wrong or there were any other kind of issues, such subscription could get removed. So you need to check subscriptions before you sent anything.
You can use NotificationHubClient.GetAllRegistrationsAsync(int)
method [1] to get all registrations.
[1] https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.notificationhubs.notificationhubclient#Microsoft_Azure_NotificationHubs_NotificationHubClient_GetAllRegistrationsAsync_System_Int32_
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With