Interface PushNotificationService
-
public interface PushNotificationServiceThe PushNotificationService object is accessible from theUserobject, and provides access to push notification related capabilities and actions.The PushNotificationService object provides a set of APIs that allow application developers to manage push notification service.
Push notification service is added to activate, deactivate the push notifications and process the push notification messages. The client application shall pass the push notification message received from Firebase Cloud Messaging (FCM) to Client SDK for processing.
Push notification service will be activated by Client SDK if activation mode is provisioned as SIP and registration with the server is successful.
The client application is notified about status updates reported by the push notification server through listener that the application has added to the PushNotificationService object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(PushNotificationServiceListener listener)Adds a new listener to the service.voiddeactivate(PushNotificationCompletionHandler completionHandler)Deactivates the push notification service.ServiceStatusgetTelephonyEventServiceStatus()Returns the ServiceStatus object describing whether the telephony event push notification service is enabled.voidprocessRemoteNotification(java.util.Map<java.lang.String,java.lang.String> pushNotificationData, PushNotificationCompletionHandler completionHandler)Processes the push notification message.voidremoveListener(PushNotificationServiceListener listener)Removes a listener from the service.
-
-
-
Method Detail
-
addListener
void addListener(PushNotificationServiceListener listener)
Adds a new listener to the service.- Parameters:
listener-PushNotificationServiceListenerto be added to the service.
-
removeListener
void removeListener(PushNotificationServiceListener listener)
Removes a listener from the service.- Parameters:
listener-PushNotificationServiceListenerinstance that is removed from the service.
-
getTelephonyEventServiceStatus
ServiceStatus getTelephonyEventServiceStatus()
Returns the ServiceStatus object describing whether the telephony event push notification service is enabled.This property reflects the status of the network-based telephony push notification service on behalf of this user.
- Returns:
ServiceStatusobject describing whether a certain service is enabled.
-
deactivate
void deactivate(PushNotificationCompletionHandler completionHandler)
Deactivates the push notification service.The client application should call to deactivate push notification service after the application configuration is reset. This method is called to make sure that an application without an identity no longer receives push notification messages from the server on behalf of a user who is removed from the application.
- Parameters:
completionHandler-PushNotificationCompletionHandlerfor this operation.
-
processRemoteNotification
void processRemoteNotification(java.util.Map<java.lang.String,java.lang.String> pushNotificationData, PushNotificationCompletionHandler completionHandler)Processes the push notification message.The client application should call to process the push notification message received from the Firebase Cloud Messaging (FCM) server. The signature of the API is consistent with the callback provided by the FCM when there is an incoming push notification.
- Parameters:
pushNotificationData- map of key/value pair containing the push notification data to process.completionHandler-PushNotificationCompletionHandlerfor this operation.
-
-