Package 

Object PushNotifications

  • All Implemented Interfaces:

    
    public class PushNotifications
    
                        

    Public entry point to use push notifications with zendesk.android.messaging.Messaging.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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.android.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. It also checks the current conversation on the conversation screen to prevent notifications being shown for a matching conversation

        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