openimsdk / open-im-sdk-android

IM Android
https://openim.io
MIT License
225 stars 157 forks source link

The message sending callback listener is not working #18

Closed Topone closed 2 years ago

Topone commented 2 years ago

android 发消息能正常发出去,但是监听没有回调,只会触发会话监听OnConversationListener 的 onConversationChanged 会话更新

client.messageManager.sendMessage(object : OnMsgSendCallback { override fun onSuccess(s: String?) { Log.e("发送消息", "发送成功$s") } override fun onProgress(progress: Long) { Log.e("发送消息", "正在发送$progress") } override fun onError(code: Long, error: String?) { Log.e("发送消息", "发送失败错误码$code") Log.e("发送消息", "发送失败$error") } }, client.messageManager.createTextMessage(chat_content.text.toString()), uid, "", false)

Topone commented 2 years ago

端口错误,用的30000,改成17778后监听有效,暂时先关了