Notification SDK Server  4.34.0
The Notification SDK Server provides a library to send notification to various devices (iOS and Android)
INotificationSDKServer Interface Reference

Provides the entry points for the NotificationSDKServer library:


More...

Inherited by NotificationSDKServer.

Public Member Functions

void SendNotification (string vascoNotificationIdentifier, Notification notification)
 Sends a notification, described by a Notification object, using the specified client device identifier.
As the process of sending a notification is asynchronous, a callback is necessary in order to handle errors or to report success. More...
 
void AwaitSendTerminationAndFinish ()
 Wait for all submitted notifications to be sent.
The last notifications that have not been sent after a specific timeout (which is specified in the NotificationSDKServerSettings object of the NotificationSDKServer object) will be cancelled.
All connections are closed. The object is not usable anymore and thus can't be used to send notifications. More...
 
Dictionary< string, DateTime > GetIOSInactiveDevices ()
 Returns the list of devices that reported failed-delivery attempts to the Apple Feedback services.
The result is a map, containing the notification identifier mapped to the timestamp when APNs determined that the application no longer exists on the device. More...
 
NotificationSDKServerPlatformNames GetPlatformName (string vascoNotificationIdentifier)
 Gets the platform name from a VASCONotificationIdentifier identified by its hexadecimal representation. More...
 
int GetPayloadLength (Notification notification, NotificationSDKServerPlatformNames platformName)
 Gets the notification payload length, in bytes, depending on the given platform name.
For all platforms, the payload is encoded in UTF-8 before its length calculation.
Therefore, a non-latin character (Cyrillic, Japanese, Arabic, etc.) will have a length greater than 1.
Please note that each protocol adds some overhead. The usable length is thus smaller than the theoretical maximum payload length. More...
 

Static Public Attributes

const string VERSION = "4.34.0"
 NotificationSDKServer library version. More...
 
const int MAX_PAYLOAD_LENGTH_ANDROID = 4096
 Maximum length, in bytes, of the notification payload for Android as described by the Google Cloud Messaging (GCM) specifications. More...
 
const int MAX_PAYLOAD_LENGTH_IOS = 2048
 Maximum length, in bytes, of the notification payload for iOS as described by the Apple Push Notification Service (APNS) specifications. More...
 

Events

SendNotificationErrorDelegate OnSendNotificationError
 Callback implementing SendNotificationErrorDelegate, and called in case of error while sending a notification. More...
 
SendNotificationSuccessDelegate OnSendNotificationSuccess
 Callback implementing SendNotificationSuccessDelegate, and called in case of success while sending a notification. More...
 

Detailed Description

Provides the entry points for the NotificationSDKServer library:


Version
4.34.0

Member Function Documentation

◆ AwaitSendTerminationAndFinish()

void AwaitSendTerminationAndFinish ( )

Wait for all submitted notifications to be sent.
The last notifications that have not been sent after a specific timeout (which is specified in the NotificationSDKServerSettings object of the NotificationSDKServer object) will be cancelled.
All connections are closed. The object is not usable anymore and thus can't be used to send notifications.

Exceptions
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerExceptionException containing an error code and a message. Available error codes are:

Implemented in NotificationSDKServer.

◆ GetIOSInactiveDevices()

Dictionary<string, DateTime> GetIOSInactiveDevices ( )

Returns the list of devices that reported failed-delivery attempts to the Apple Feedback services.
The result is a map, containing the notification identifier mapped to the timestamp when APNs determined that the application no longer exists on the device.

Deprecated:
GetInactiveDevices is no longer supported by Apple. This function will return null.
Returns
The map containing a notification identifier and a timestamp.
Exceptions
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerExceptionException containing an error code and a message. Available error codes are:

Implemented in NotificationSDKServer.

◆ GetPayloadLength()

int GetPayloadLength ( Notification  notification,
NotificationSDKServerPlatformNames  platformName 
)

Gets the notification payload length, in bytes, depending on the given platform name.
For all platforms, the payload is encoded in UTF-8 before its length calculation.
Therefore, a non-latin character (Cyrillic, Japanese, Arabic, etc.) will have a length greater than 1.
Please note that each protocol adds some overhead. The usable length is thus smaller than the theoretical maximum payload length.

Parameters
notificationNotification containing a title, subject...
platformNameThe platform name.
Returns
The notification payload length in bytes.
Exceptions
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerException

Implemented in NotificationSDKServer.

◆ GetPlatformName()

NotificationSDKServerPlatformNames GetPlatformName ( string  vascoNotificationIdentifier)

Gets the platform name from a VASCONotificationIdentifier identified by its hexadecimal representation.

Parameters
vascoNotificationIdentifierHexadecimal representation of the VASCO notification identifier.
Returns
The platform name of VASCO Notification Identifier (see NotificationSDKServerPlatformNames).
Exceptions
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerExceptionException containing an error code and a message. Available error codes are:

Implemented in NotificationSDKServer.

◆ SendNotification()

void SendNotification ( string  vascoNotificationIdentifier,
Notification  notification 
)

Sends a notification, described by a Notification object, using the specified client device identifier.
As the process of sending a notification is asynchronous, a callback is necessary in order to handle errors or to report success.

Parameters
vascoNotificationIdentifierThe VASCO Notification Identifier provided by the client. String, cannot be null or empty.
notificationNotification that must be sent to the device (check Notification).
Exceptions
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerExceptionException containing an error code and a message. Available error codes are:

Implemented in NotificationSDKServer.

Field Documentation

◆ MAX_PAYLOAD_LENGTH_ANDROID

const int MAX_PAYLOAD_LENGTH_ANDROID = 4096
static

Maximum length, in bytes, of the notification payload for Android as described by the Google Cloud Messaging (GCM) specifications.

◆ MAX_PAYLOAD_LENGTH_IOS

const int MAX_PAYLOAD_LENGTH_IOS = 2048
static

Maximum length, in bytes, of the notification payload for iOS as described by the Apple Push Notification Service (APNS) specifications.

◆ VERSION

const string VERSION = "4.34.0"
static

NotificationSDKServer library version.

Event Documentation

◆ OnSendNotificationError

SendNotificationErrorDelegate OnSendNotificationError

Callback implementing SendNotificationErrorDelegate, and called in case of error while sending a notification.

◆ OnSendNotificationSuccess

SendNotificationSuccessDelegate OnSendNotificationSuccess

Callback implementing SendNotificationSuccessDelegate, and called in case of success while sending a notification.


The documentation for this interface was generated from the following file: