Package com.dimelo.dimelosdk.main
Class Dimelo.DimeloListener
java.lang.Object
com.dimelo.dimelosdk.main.Dimelo.DimeloListener
- Enclosing class:
- Dimelo
The `DimeloListener` allows you to react to network activity and react to events created by the chat views.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when chat receives new messages from the server (even while the chat is not visible).void
Called when the user sends a message.void
dimeloChatMessageSendFail
(DimeloConnection.DimeloError error) Deprecated.void
dimeloDidBeginNetworkActivity
(Dimelo dimelo) Called when a network activity started.void
dimeloDidEndNetworkActivity
(Dimelo dimelo) Called when a network activity ended.boolean
dimeloShouldDisplayNotificationWithText
(Dimelo dimelo, String message) Asks if a notification bar should be displayed.void
Called when a the chat is closed.void
onLocationButtonClick
(Chat chat) void
Called when a the chat is opened.boolean
Called when a URL is going to be opened by the SDK.
-
Constructor Details
-
DimeloListener
public DimeloListener()
-
-
Method Details
-
dimeloShouldDisplayNotificationWithText
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
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
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.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
Called when a the chat is opened.
- Parameters:
dimelo
- A `Dimelo` API instance.
-
onClose
Called when a the chat is closed.
- Parameters:
dimelo
- A `Dimelo` API instance.
-
onLocationButtonClick
-
rcShouldDelegateUrlOpening
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.
-