Interface Conversation

    • Method Detail

      • markAllAsRead

        void markAllAsRead()
        Marks all unread messages as read.

        Marks all unread messages as read, and notifies that the unread count changed.

      • sendMessage

        void sendMessage​(Message message)
        Adds a new message to the conversation.

        For each message added using sendMessage, a notification will be fired indicating the success or failure status of the upload.

        A conversation will be started automatically if this is the very first message and a conversation hasn't been started yet.

        Parameters:
        message - The message to send
      • retryMessage

        Message retryMessage​(Message message)
        Retries a message that failed to send.

        The failed message will be removed from the message list, and a new message will be constructed with the same text as the failed message. A notification will be fired indicating the success or failure status of the upload.

        Parameters:
        message - The failed message
        Returns:
        The sent message, or null if the message could not be sent
      • addMessage

        void addMessage​(Message message)
        Adds a new message to the conversation without sending it.
        Parameters:
        message - The message to add
      • removeMessage

        void removeMessage​(Message message)
        Removes a failed or unsent message from the conversation.
        Parameters:
        message - The message to remove
      • startTyping

        void startTyping()
        Notify the server that the user is typing. This method is called automatically when using the default ConversationFragment. Only call this method if your application implements its own conversation view.

        Typing updates are automatically throttled, so you may call this method as often as necessary. The typing stop event will automatically fire 10 seconds after the most recent call to this method.

        See Also:
        stopTyping()
      • stopTyping

        void stopTyping()
        Notify the server that the user has finished typing. This method is called automatically when using the default ConversationFragment. Only call this method if your application implements its own conversation view.

        If the user was not flagged as typing recently, this method will result in a no-op.

        See Also:
        startTyping()
      • processPayment

        void processPayment​(CreditCard creditCard,
                            MessageAction action)
        Processes a credit card payment.

        Parameters:
        creditCard - The credit card object
        action - The message action
        See Also:
        CreditCard, MessageAction
      • triggerAction

        void triggerAction​(MessageAction action)
        Triggers message action resulting from a click.

        Parameters:
        action - The message action
        See Also:
        MessageAction
      • loadCardSummary

        void loadCardSummary()
        Loads billing info (if exists) to display last4 in credit form.
      • smoochShown

        void smoochShown()
        Notifies the delegate when Smooch Conversation is shown

        Used by the smooch-ui package to notify the Conversation.Delegate when Smooch is shown

      • smoochHidden

        void smoochHidden()
        Notifies the delegate when Smooch Conversation is hidden

        Used by the smooch-ui package to notify the Conversation.Delegate when Smooch is hidden

      • isSmoochShown

        boolean isSmoochShown()
        Returns true if the Smooch UI is currently shown
        Returns:
        true if the Smooch UI is currently shown, false otherwise