|
@@ -51,6 +51,7 @@ public class ImManager implements IMInterface {
|
|
|
|
|
|
// 新消息到达
|
|
|
private String topic_arrive;
|
|
|
+ private String topic_conversation;
|
|
|
|
|
|
// 发送消息应答
|
|
|
private String topic_send_ack;
|
|
@@ -102,6 +103,7 @@ public class ImManager implements IMInterface {
|
|
|
topic_send_ack = Constant.getSdkAppID() + "/" + PacketType.SEND_ACK + Constant.getUserId();
|
|
|
topic_connected = Constant.getSdkAppID() + "/" + PacketType.CONNECTED + Constant.getUserId();
|
|
|
topic_arrive = Constant.getSdkAppID() + "/" + PacketType.SEND + Constant.getUserId();
|
|
|
+ topic_conversation = Constant.getSdkAppID() + "/" + PacketType.CONVERSATION + Constant.getUserId();
|
|
|
topic_pang = Constant.getSdkAppID() + "/" + PacketType.PANG + Constant.getUserId();
|
|
|
topic_result = Constant.getSdkAppID() + "/" + PacketType.RESULT + Constant.getUserId();
|
|
|
topic_system = Constant.getSdkAppID() + "/" + PacketType.SYSTEM + Constant.getUserId();
|
|
@@ -136,6 +138,7 @@ public class ImManager implements IMInterface {
|
|
|
mqttClient.subscribe(topic_pang, 2);
|
|
|
mqttClient.subscribe(topic_result, 2);
|
|
|
mqttClient.subscribe(topic_system, 2);
|
|
|
+ mqttClient.subscribe(topic_conversation, 2);
|
|
|
Log.e("======>connectComplete", topic_send_ack);
|
|
|
} catch (MqttException e) {
|
|
|
Log.e(TAG, "=====>connectComplete", e);
|
|
@@ -184,6 +187,10 @@ public class ImManager implements IMInterface {
|
|
|
handler.sendMessage(m);
|
|
|
|
|
|
}
|
|
|
+ // 会话更新
|
|
|
+ else if (topic.equals(topic_conversation)) {
|
|
|
+ Log.d("======>会话列表更新", topic + "::\n" + msg);
|
|
|
+ }
|
|
|
// 新消息送达
|
|
|
else if (topic.equals(topic_arrive)) {
|
|
|
SZYXMessage szyxMessage = GsonImplHelp.get().toObject(msg, SZYXMessage.class);
|
|
@@ -197,7 +204,7 @@ public class ImManager implements IMInterface {
|
|
|
});
|
|
|
}
|
|
|
} else
|
|
|
- Log.e("======>messageArrived", topic + "::" + msg);
|
|
|
+ Log.e("======>未知消息", topic + "::" + msg);
|
|
|
|
|
|
|
|
|
}
|