Class Dimelo.DimeloListener

java.lang.Object
com.dimelo.dimelosdk.main.Dimelo.DimeloListener
Enclosing class:
Dimelo

public abstract static class Dimelo.DimeloListener extends Object
The `DimeloListener` allows you to react to network activity and react to events created by the chat views.
  • Constructor Details

    • DimeloListener

      public DimeloListener()
  • Method Details

    • dimeloShouldDisplayNotificationWithText

      public boolean dimeloShouldDisplayNotificationWithText(Dimelo dimelo, String message)
       Asks if a notification bar should be displayed.
      
       By default, a standard notification slides from the top. When the user taps it,
       the chat view is opened (via `dimeloDisplayChatViewController:`).
       
      Parameters:
      dimelo - An API instance.
      message - A message to be displayed in the notification. If you override Dimelo notification bar, you may use this text to display in your own notification.
      Returns:
      `false` if you want to display custom UI or simply ignore this notification.
    • dimeloDidBeginNetworkActivity

      public void dimeloDidBeginNetworkActivity(Dimelo dimelo)
       Called when a network activity started.
       This method can be called multiple times, for each network request.
       Every call is guaranteed to be eventually balanced by `dimeloDidEndNetworkActivity:`.
       
      Parameters:
      dimelo - An `Dimelo` API instance.
    • dimeloDidEndNetworkActivity

      public void dimeloDidEndNetworkActivity(Dimelo dimelo)
       Called when a network activity ended.
       This method can be called multiple times, for each network request.
       This call is guaranteed to balance every `dimeloDidBeginNetworkActivity:`.
       
      Parameters:
      dimelo - A `Dimelo` API instance.
    • dimeloChatDidSendMessage

      public void dimeloChatDidSendMessage()
      Called when the user sends a message.
    • dimeloChatDidReceiveNewMessages

      public void dimeloChatDidReceiveNewMessages()
      Called when chat receives new messages from the server (even while the chat is not visible).
    • dimeloChatMessageSendFail

      @Deprecated public void dimeloChatMessageSendFail(DimeloConnection.DimeloError error)
      Deprecated.
       Called when chat try to send a messages and fail (even while the chat is not visible).
       Deprecated - v1.1 handles offline mode. Messages are put in a waiting list when send fails.
       
    • onOpen

      public void onOpen(Dimelo dimelo)
       Called when a the chat is opened.
       
      Parameters:
      dimelo - A `Dimelo` API instance.
    • onClose

      public void onClose(Dimelo dimelo)
       Called when a the chat is closed.
       
      Parameters:
      dimelo - A `Dimelo` API instance.
    • onLocationButtonClick

      public void onLocationButtonClick(Chat chat)
    • rcShouldDelegateUrlOpening

      public boolean rcShouldDelegateUrlOpening(URI uri)
       Called when a URL is going to be opened by the SDK.
       
      Parameters:
      uri - A `URI` that represents the url that is going to be opened.
      Returns:
      `true`: prevents the Engage Messaging SDK from opening the URL.