- 07 Nov 2024
- 1 Minute à lire
- SombreLumière
Integrate the Notification SDK Server
- Mis à jour le 07 Nov 2024
- 1 Minute à lire
- SombreLumière
Java
The following procedure allows you to integrate and use the Notification SDK Server in your Java project.
The Notification SDK Server requires Java 8.
To use the Notification SDK Server sample in your Java project
Link the libraries from the OneSpan Mobile Security Suite package to your project’s classpath.
In NotificationSDKServerSample.java, replace the following variables according to your device:
Android
Adjust the ANDROID_VASCO_NOTIFICATION_IDENTIFIER variable to set up the OneSpan Notification Identifier for your device. You can retrieve it from your client sample integration after the notification service registration.
Adjust the ANDROID_PROJECT_KEY variable to set up your Android project key (API key). You can retrieve it from the Google API Console.
iOS
Adjust the IOS_VASCO_NOTIFICATION_IDENTIFIER variable to set up the Notification Identifier for your device. You can retrieve it from your client sample integration after the notification service registration.
Update the Boolean variable IOS_USE_DEVELOPMENT_SERVER as needed. Note that this also depends on the used PKCS #8 key.
Adjust the IOS_P8_KEY_PATH variable to set up the path of your PKCS #8 key.
Adjust the IOS_KEY_ID variable to set up the password of your PKCS #8 key.
Adjust the IOS_TEAM_ID variable to set up the identifier of the team that is responsible for the creation of the PKCS #8 key.
You are now ready to use the Notification SDK Server.
.NET
The Notification SDK Server contains a solution sample to demonstrate how to integrate the SDK in your .NET project. The following procedures describe how to use both the sample and the SDK in your .NET project.
To use the Notification SDK Server Sample .NET project
Copy NotificationSDKServer.dll from the OneSpan Mobile Security Suite package in the lib folder.
You are now ready to use the Notification SDK Server sample.
To use the Notification SDK Server in your .NET project
Add a reference to NotificationSDKServer.dll from the OneSpan Mobile Security Suite package to your project.
Add a Nuget package reference to Newtonsoft.Json version 13.0.3.
Add a Nuget package reference to jose-jwt version 4.1.0.
Add a Nuget package reference to FirebaseAdmin version 3.0.1.
You are now ready to use the Notification SDK Server.
The token-based authentication scheme is the only available method to send push notifications to iOS devices.