Interface PushNotificationService


  • public interface PushNotificationService
    The PushNotificationService object is accessible from the User object, 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 Detail

      • 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:
        ServiceStatus object 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 - PushNotificationCompletionHandler for 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 - PushNotificationCompletionHandler for this operation.