Package 

Object PushNotifications

    • Method Detail

      • updatePushNotificationToken

         final static Unit updatePushNotificationToken(String pushNotificationToken)

        Updates the pushNotificationToken associated with this device to receive push notifications.

        This function can be called at any time. The pushNotificationToken is only be updated once a zendesk.conversationkit.model.User becomes available. If one was not available when this method was called, then the SDK will defer the update automatically.

        Parameters:
        pushNotificationToken - the device token for receiving push notifications
      • shouldBeDisplayed

         final static PushResponsibility shouldBeDisplayed(Map<String, String> messageData)

        When receiving a push notification payload, this method can be used to check if it belongs to Messaging and if it can be displayed.

        Parameters:
        messageData - the data received from the push notification
      • displayNotification

         final static Unit displayNotification(Context context, Map<String, String> messageData)

        Displays the given messageData as a push notification in the system tray if the push belongs to Messaging and the SDK is able to display it.

        If the message doesn't belong to Messaging or the SDK is unable to display the message then this method will return early, without displaying the push notification.

        Parameters:
        context - an instance of Context
        messageData - the data received from the push notification