@Deprecated
public interface MessageClientListener
MessageClientListener
handles incoming messages and events of outgoing messages.
When an incoming message has been received, onIncomingMessage(com.sinch.android.rtc.messaging.MessageClient, com.sinch.android.rtc.messaging.Message)
is
called.Modifier and Type | Method and Description |
---|---|
void |
onIncomingMessage(MessageClient client,
Message message)
Deprecated.
Tells the listener that a message has been received.
|
void |
onMessageDelivered(MessageClient client,
MessageDeliveryInfo deliveryInfo)
Deprecated.
Tells the listener that there was a message that was delivered.
|
void |
onMessageFailed(MessageClient client,
Message message,
MessageFailureInfo failureInfo)
Deprecated.
Tells the listener that there was a failure sending a message.
|
void |
onMessageSent(MessageClient client,
Message message,
java.lang.String recipientId)
Deprecated.
Tells the listener that a message for a specific recipient has been sent by the local user.
|
void |
onShouldSendPushData(MessageClient client,
Message message,
java.util.List<PushPair> pushPairs)
Deprecated.
Tells the listener that the recipient device can't be reached directly,
and it is required to wake up the recipient's application with a push notification.
|
void onIncomingMessage(MessageClient client, Message message)
client
- The client informing the listener that a message was
received.message
- The incoming message.void onMessageSent(MessageClient client, Message message, java.lang.String recipientId)
client
- The client informing the listener that an incoming message was
received.message
- The outgoing message.recipientId
- The recipientId that of the message that we get the onSent eventvoid onMessageFailed(MessageClient client, Message message, MessageFailureInfo failureInfo)
Message
received, instead create a
new
WritableMessage
and send that.client
- The client informing the listener that an incoming message was
received.message
- The message which sending failed.failureInfo
- Information about the failed message for a specific recipientvoid onMessageDelivered(MessageClient client, MessageDeliveryInfo deliveryInfo)
client
- The client informing the listener that an incoming message was
received.deliveryInfo
- Information about the message that was delivered.void onShouldSendPushData(MessageClient client, Message message, java.util.List<PushPair> pushPairs)
PushPair
. The PushPair.getPushData()
identifies a device
that should be sent
the PushPair.getPushPayload()
.client
- The client informing the listener that an incoming message was
received.message
- The message associated with the push notificationpushPairs
- Each entry identifies a certain device that should be requested to be woken
up via
push notification and the corresponding opaque payload to be sent with the
notification.
The push data in the PushPair is the data that was registered earlier by
the recipient's application in SinchClient.registerPushNotificationData(byte[]
pushPairs)
.Copyright 2016, Sinch AB