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

More...

Inherits INotificationSDKServer, and IDisposable.

Public Member Functions

 NotificationSDKServer (NotificationSDKServerCredentials credentials)
 Constructs a NotificationSDKServer object. More...
 
 NotificationSDKServer (NotificationSDKServerCredentials credentials, NotificationSDKServerSettings settings)
 Constructs a NotificationSDKServer object with the credentials in input. More...
 
void SendNotification (string vascoNotificationIdentifier, Notification notification)
 Sends a notification, described by a Notification object, using the specified client device identifier. 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.
Deprecated:
GetInactiveDevices is no longer supported by Apple. This function will return null.
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...
 
void AwaitSendTerminationAndFinish ()
 Wait for all submitted notifications to be sent and close the instance. More...
 
void Dispose ()
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Events

SendNotificationErrorDelegate OnSendNotificationError
 
SendNotificationSuccessDelegate OnSendNotificationSuccess
 
- Events inherited from INotificationSDKServer
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...
 

Additional Inherited Members

- Static Public Attributes inherited from INotificationSDKServer
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...
 

Detailed Description

Constructor & Destructor Documentation

◆ NotificationSDKServer() [1/2]

Constructs a NotificationSDKServer object.

Parameters
credentialsThe NotificationSDKServerCredentials necessary to log in to the platform specific push notification services.

◆ NotificationSDKServer() [2/2]

Constructs a NotificationSDKServer object with the credentials in input.

Parameters
credentialsThe NotificationSDKServerCredentials necessary to log in to the platform specific push notification services.
settingsThe NotificationSDKServerSettings necessary to tune server specific settings. Can be null.
Exceptions
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerExceptionException containing an error code and a message. Available error codes are:

Member Function Documentation

◆ AwaitSendTerminationAndFinish()

void AwaitSendTerminationAndFinish ( )
inline

Wait for all submitted notifications to be sent and close the instance.

Exceptions
NotificationSDKServerException

Implements INotificationSDKServer.

◆ Dispose() [1/2]

void Dispose ( )
inline

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
inlineprotectedvirtual

◆ GetIOSInactiveDevices()

Dictionary<string, DateTime> GetIOSInactiveDevices ( )
inline

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.

Implements INotificationSDKServer.

◆ GetPayloadLength()

int GetPayloadLength ( Notification  notification,
NotificationSDKServerPlatformNames  platformName 
)
inline

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
platformNametargeted platform name
Returns
The notification payload length in bytes.

Implements INotificationSDKServer.

◆ GetPlatformName()

NotificationSDKServerPlatformNames GetPlatformName ( string  vascoNotificationIdentifier)
inline

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 VASCONotificationIdentifier

Implements INotificationSDKServer.

◆ SendNotification()

void SendNotification ( string  vascoNotificationIdentifier,
Notification  notification 
)
inline

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
vascoNotificationIdentifierVASCO notification identifier provided by the client. Cannot be null or empty.
notificationNotification that must be sent to the device

Implements INotificationSDKServer.

Event Documentation

◆ OnSendNotificationError

SendNotificationErrorDelegate OnSendNotificationError

◆ OnSendNotificationSuccess

SendNotificationSuccessDelegate OnSendNotificationSuccess


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