Is notification hub support deeplink?

嘉辉 梁 0 Reputation points
2023-06-27T08:47:31.7033333+00:00

I want to ask if the notification hub supports deeplinks? I have consulted with the support provider before, supporter tell me when sent notification to iOS device, I need to add the deeplink attribute to the notification payload in aps-alert. However, it has been tested and found to be invalid. Supporter told me that the app side need to add logical to handle deeplink. However, when I was using another vendor before, the app side did not need to do any special handle when receive notifications sent from APN.

Below is my test notification payload format:

{"aps":{"alert":{"title":"xxxx","body":"xxxx","deeplink":"xxxx"}}}

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.
384 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,301 Reputation points Moderator
    2023-06-28T23:50:09.3+00:00

    Hi @嘉辉 梁 thanks for the question. Yes, I believe Azure Notification Hubs supports deep links. You can include a deep link in the notification payload and the app can handle it when the notification is received.

    To include a deep link in an iOS notification payload, you need to include it in the url attribute of the aps object. You can try this in your payload:

    {
        "aps": {
            "alert": {
                "title": "xxxx",
                "body": "xxxx"
            },
            "url": "xxxx"
        }
    }
    

    In this example, the deep link is included in the url attribute of the aps object. When the notification is received, the app can handle the deep link by checking the value of the url attribute.

    Hope that helps

    Best,

    Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.