![]() |
Notification SDK Server
4.34.0
The Notification SDK Server provides a library to send notification to various devices (iOS and Android)
|
Provides the entry points for the NotificationSDKServer library:
GetPayloadLength(Notification, NotificationSDKServerPlatformNames): gets the payload length for a specific notification and platform.
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... | |
Provides the entry points for the NotificationSDKServer library:
GetPayloadLength(Notification, NotificationSDKServerPlatformNames): gets the payload length for a specific notification and platform.
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.
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerException | Exception containing an error code and a message. Available error codes are:
|
Implemented in NotificationSDKServer.
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.
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerException | Exception containing an error code and a message. Available error codes are:
|
Implemented in NotificationSDKServer.
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.
notification | Notification containing a title, subject... |
platformName | The platform name. |
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerException |
|
Implemented in NotificationSDKServer.
NotificationSDKServerPlatformNames GetPlatformName | ( | string | vascoNotificationIdentifier | ) |
Gets the platform name from a VASCONotificationIdentifier identified by its hexadecimal representation.
vascoNotificationIdentifier | Hexadecimal representation of the VASCO notification identifier. |
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerException | Exception containing an error code and a message. Available error codes are:
|
Implemented in NotificationSDKServer.
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.
vascoNotificationIdentifier | The VASCO Notification Identifier provided by the client. String, cannot be null or empty. |
notification | Notification that must be sent to the device (check Notification). |
OneSpan.Digipass.Sdk.Utils.Notification.Server.Exceptions.NotificationSDKServerException | Exception containing an error code and a message. Available error codes are:
|
Implemented in NotificationSDKServer.
|
static |
Maximum length, in bytes, of the notification payload for Android as described by the Google Cloud Messaging (GCM) specifications.
|
static |
Maximum length, in bytes, of the notification payload for iOS as described by the Apple Push Notification Service (APNS) specifications.
|
static |
NotificationSDKServer library version.
SendNotificationErrorDelegate OnSendNotificationError |
Callback implementing SendNotificationErrorDelegate, and called in case of error while sending a notification.
SendNotificationSuccessDelegate OnSendNotificationSuccess |
Callback implementing SendNotificationSuccessDelegate, and called in case of success while sending a notification.