Interface NotificationSDKServerCallbacks


  • public interface NotificationSDKServerCallbacks
    Callbacks to be implemented when sending a notification.
    • onSendNotificationError: callback called if an error happened
    • onSendNotificationSuccess: callback called if the notification has been correctly sent

    Note that these callbacks are meant for tracking purpose. Actual delivery of the notifications highly depends on the service platform targeted (Google Cloud Messaging, Apple Push Notification Service, etc). Thus, there is no guaranty to enter these callbacks as it relies on the platform service status.

    On iOS, the NotificationSDKServerErrorCodes.NOTIFICATION_IOS_TOKEN_INVALID is returned in the exception if the device token is no longer valid It must be provided to the NotificationSDKServer.

    • Method Detail

      • onSendNotificationError

        void onSendNotificationError​(int notificationTrackingIdentifier,
                                     java.lang.String vascoNotificationIdentifier,
                                     NotificationSDKServerException e)
        Callback called in case of error while sending a notification
        Parameters:
        notificationTrackingIdentifier - the tracking identifier of the corresponding Notification
        vascoNotificationIdentifier - the VASCO notification identifier of the corresponding Notification
        e - the exception describing the error
      • onSendNotificationSuccess

        void onSendNotificationSuccess​(int notificationTrackingIdentifier,
                                       java.lang.String vascoNotificationIdentifier)
        Callback called in case of success while sending a notification
        Parameters:
        notificationTrackingIdentifier - the tracking identifier of the corresponding notification (see Notification)
        vascoNotificationIdentifier - the VASCO notification identifier of the corresponding notification (see Notification)