You should implement (and register) the NotificationChannelListener if you want to receive a callback when a user has dismissed a notification from their screen. The NotificationChannelListener also allows your application to receive information about other interactions with an onscreen notification. For example, the user interface may inform your adapter that a notification has been read. More...
Public Member Functions | |
void | OnNotificationAction (Caplin.DataSource.Notification.INotificationChannel channel, string notificationId, string action) |
Called when a contrib comes in for a Notification serviced by this provider. More... | |
void | OnNotificationRequest (Caplin.DataSource.Notification.INotificationChannel channel, string notificationId) |
Called when a previously unsubmitted notification in a channel is requested. More... | |
You should implement (and register) the NotificationChannelListener if you want to receive a callback when a user has dismissed a notification from their screen. The NotificationChannelListener also allows your application to receive information about other interactions with an onscreen notification. For example, the user interface may inform your adapter that a notification has been read.
The DISMISS action is handled automatically, removing the dismissed notification from the channel, but a callback is still received on registered listeners.
Register this listener on the incoming channel from INotificationApplicationListener.NotificationChannelOpened
The onNotificationRequest is received when a request for a notification comes in that refers to a notification that hasn't been sent on this channel previously. That is, one which has been sent by a different NotificationProvider with the same source name for the same user from a separate adapter. A use case for this set up is having one adapter publishing which Notifications are available (Notifications with no fields set) and another providing the notification fields (Notifications with fields set). Notification requests would be received by the fields-provider for notifications sent by the available-notifications-provider which would trigger the onNotificationRequest callback. Simply send the requested notifications on the channel or submit a INotificationChannel.SendNotificationNotFound to the NotificationChannel received on the INotificationChannelListener.OnNotificationRequest callback.
Refer to the NotificationConfiguration for how to configure the NotificationProvider for this use case.
void Caplin.DataSource.Notification.INotificationChannelListener.OnNotificationAction | ( | Caplin.DataSource.Notification.INotificationChannel | channel, |
string | notificationId, | ||
string | action | ||
) |
Called when a contrib comes in for a Notification serviced by this provider.
This callback enables the provider to respond to a contrib asynchronously.
The action DISMISS is a special case - dismissed notifications will be removed from the channel automatically.
channel | The user's NotificationChannel |
notificationId | The unique identifier for the notification in the channel |
action | The action sent to the provider. |
void Caplin.DataSource.Notification.INotificationChannelListener.OnNotificationRequest | ( | Caplin.DataSource.Notification.INotificationChannel | channel, |
string | notificationId | ||
) |
Called when a previously unsubmitted notification in a channel is requested.
This callback enables a response to a notification request to be sent asynchronously, to respond to the request use INotificationChannel.SendNotification or if a not found is required use INotificationChannel.SendNotificationNotFound both using the same uniqueId as an input.
channel | The user's notification channel |
notificationId | The unique identifier for the notification in the channel |