Interface OnSendMessageListener

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Message onSend(Message message) 消息发送前监听器处理接口(是否发送成功可以从SentStatus属性获取) 可以通过这个方法,过滤,修改发送出的消息。
      abstract boolean onSent(Message message, ErrorCode errorCode) 消息发送后回调接口。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onSend

         abstract Message onSend(Message message)

        消息发送前监听器处理接口(是否发送成功可以从SentStatus属性获取) 可以通过这个方法,过滤,修改发送出的消息。

        Parameters:
        message - 发送的消息实例。
        Returns:

        处理后的消息实例,注意:可以通过 return 的返回值,过滤消息 当 return null 时,该消息不发送,界面也无显示 也可以更改 message 内的消息内容,发送出的消息,就是更改后的。

      • onSent

         abstract boolean onSent(Message message, ErrorCode errorCode)

        消息发送后回调接口。

        Parameters:
        message - 消息实例。
        errorCode - 发送消息失败的状态码,消息发送成功 errorCode 为 null。
        Returns:

        事件是否被消费。 true 事件被消费,SDK 不会进行 UI 显示。false, 事件未被消费, SDK 会进行 UI 显示。