Notification Interactions
A user can interact with a notification by:
Tapping the notification
Clicking one of the buttons on the notification
The result of any of those interactions depends on the action you select on the Notification Message Template. There are three options:
Open App: opens the application.
Open Deep Link: opens the application. Then you can choose whether the deep link will be automatically opened or you want to manually handle it via the
automaticallyOpenDeeplinks
parameter.Open URL: opens the application. Then opens the url. The actual activity that is launched depends on the url and the installed applications on the device. In most cases, urls with http/https scheme will be opened in the browser.
Handling all notification interactions
All notification interactions go through the UNUserNotificationCenterDelegate
which you can set up as follows:
Notice that you can control whether deep links are automatically opened or not via the parameter automaticallyOpenDeeplinks
.
Deep Links
There are two way to deal with Deep Links:
Set
automaticallyOpenDeeplinks: false
which allows you to capture the deep link and handle it as you please.Set
automaticallyOpenDeeplinks: true
which will open the deep link. The behaviour of opening the deep link depends on the installed applications and which of them will be matched to this deep link.You can associate urls with your application via Custom URLs or Universal Links.
Custom Payload
You can set a custom payload on the Notification Message Template to be delivered to your app. You can capture custom payload when your application received a notification response using the bird.notifications.handleNotificationResponse()
method. See sample code above.
Last updated