Azure Hub Notification Rich with Node.js

Artyou Global 106 Reputation points
2022-11-14T23:16:49.3+00:00

Hello! We are implementing the Notification Push
https://learn.microsoft.com/pt-br/azure/notification-hubs/notification-hubs-aspnet-backend-ios-apple-push-notification-service-apns-rich
And we want to use this rich messages to send images, buttons and more. Is there a documentation to use that in Node.Js?
thank you

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
180 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 12,636 Reputation points Microsoft Employee
    2022-11-30T12:09:54.633+00:00

    Apologies for late response here! Sharing below inputs about rich iOS push notifications might be helpful.

    This docs seem to indicate that rich notifications are implemented via silent notifications with custom properties on the payload (see above richId, richMessage, richType`) that the iOS application code then has to intercept and handle (documented in the provided link).

    Sorry we don’t have specific docs for this scenario, but it’s possible to infer the payload format from the linked docs:

       var aboutUser = "{\"aps\": {\"content-available\": 1, \"sound\":\"\"}, \"richId\": \"" + richNotificationInTheBackend.Id.ToString() + "\",  \"richMessage\": \"" + richNotificationInTheBackend.Message + "\", \"richType\": \"" + richNotificationInTheBackend.RichType + "\"}";  
    
    
    {  
        "aps": {  
            "content-available": 1,  
            "sound": ""  
        },  
        "richId": "<richNotificationInTheBackend.Id>",  
        "richMessage": "<richNotificationInTheBackend.Message>",  
        "richType": "<richNotificationInTheBackend.RichType>"  
    }  
    

    Further I will reach out to concern team for this as document feedback and document enhancement.

    0 comments No comments