sendmessage 错误码-1

guqun 2020-6-23 949

确认gchatmanager正常、connect连接正常

发送消息之后,收到onPrepare回调,但是隔一段时间会收到onfail回调,错误码为-1

发送消息代码如下:

public fun sendNote(toUserId: String, content: String, callback: SendMessageCallback){ var message = Message() var messageContent = TextMessageContent(content) message.content = messageContent message.direction = MessageDirection.Send message.toUsers = arrayOf(toUserId) message.sender = GlobalWildfire?.gChatManager?.userId var conversation: Conversation = Conversation(Conversation.ConversationType.Single,toUserId ) message.conversation = conversation GlobalWildfire.gChatManager?.sendMessage(message, callback) }

最新回复 (2)
  • x86 2020-6-24
    引用 2
    1. 连接回调里面status变到ConnectionStatusConnected(1)了吗?
    2. 请给我们提供一下日志,抓取日志的方法,请参考:https://docs.wildfirechat.cn/faq/android/q3.html?h=%E6%97%A5%E5%BF%97
  • guqun 2020-6-24
    引用 3
    今天莫名其妙又发送成功了,谢谢
返回