Thanks for asking question.
You may want to know that Azure Notification Hubs eliminates all complexities associated with sending push notifications on your own from your app backend. Its multi-platform, scaled-out push notification infrastructure reduces push-related coding and simplifies your backend. With Notification Hubs, devices are merely responsible for registering their PNS handles with a hub, while the backend sends messages to users or interest groups, as shown in the following figure:
It has rich set of delivery patterns which include Push notifications send to specific users: Tags and templates help you reach all cross-platform devices for a user.
Further to elaborate on How Registration happens in Azure Notification hubs in order to receive push notifications:
There are the two main patterns for registering devices:
- Registration management from the device directly to the notification hub: The device first retrieves the PNS handle from the PNS, then registers with the notification hub directly. After the registration is
successful, the app backend can send a notification targeting that registration. So When managing device registration from client
apps, the backend is only responsible for sending notifications. Client apps keep PNS handles up-to-date, and register tags. - Registration management from a backend: The advantages of managing registrations from the backend include the ability to modify tags to registrations even when the
corresponding app on the device is inactive, and to authenticate the client app before adding a tag to its registration.
If you want to know how to send push notifications to specific users that have tags associated with their registrations refer to below doc link: (for Android)
https://learn.microsoft.com/en-us/azure/notification-hubs/push-notifications-android-specific-users-firebase-cloud-messaging
You can use tags to identify all the devices associated with a particular user.
To answer on how de-registration work?
If you uninstall the app, the operating system of the device in question will invalidate the unique identifier associated with that app installation, and we will in turn de-register our records of that device.
Logging out of apps on mobile devices, on the other hand, is handled by an application, not the OS. For that reason, part of logging out should include deleting any ANH registrations or installations.
Hope this helps.