새 사용자가 스택에 있습니다.하지만 안드로이드 용 3.2.2SMU 라이브러리의 MultiUserChat에 문제가 있습니다. "gtalk.google.com"서버를 사용하고 있습니다. 그것은 간단한 예제 및 객실 I'am 하나 :XMPP aSmack MultiUserChat 서버가 이미 수신 된 메시지를 계속 전송합니다.
String room="[email protected]";
MultiUserChat muc = new MultiUserChat(connection,room);
muc.join(userNameInRoom);
muc.addMessageListener(new PacketListener()
{
@Override
public void processPacket(Packet packet)
{
...
}
});
후 : 로그인
muc.sendMessage("Text message");
:
DEBUG/SMACK(281): 06:46:29 PM SENT (1140866576): <message id="gsMe7-18"
to="[email protected]" type="groupchat"><body>Text message
</body></message>
DEBUG/SMACK(281): 06:46:29 PM RCV (1140866576): <message
from="[email protected]/userNameInRoom" to="userName"
type="groupchat"><body>Text message</body></message>
결과 : "텍스트 메시지"그것이 맞다, 그러나 :
다시 "텍스트 메시지"수신 :
DEBUG/SMACK(281): 06:54:12 PM RCV (1140866576): <presence
from="[email protected]/userNameInRoom" to="userName"><x xmlns=
"vcard-temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol/muc#user">
<item affiliation="owner" role="moderator"/><status code="110"/></x></presence>
DEBUG/SMACK(281): 06:54:12 PM RCV (1140866576): <message
from="[email protected]/userNameInRoom" to="userName"
type="groupchat"><body>Text message</body><delay stamp="2012-02-15T17:46:31Z"
from="[email protected]" xmlns="urn:xmpp:delay"/><x
stamp="20120215T17:46:31" from="[email protected]"
xmlns="jabber:x:delay"/></message>
그리고 서버가 나에게 프레젠테이션을 보낼 때마다 나는 계속해서 그 메시지를 수신했습니다. 그것은 ~ 5 분 간격으로 무한대로 계속됩니다. 그리고 예 ~ 30 분 안에 ~ 6 개의 메시지 "문자 메시지"를 받았습니다. 두 개 이상의 메시지를 보내면 존재 여부가 나에게 알려지지 않을 때 예외없이 이러한 모든 메시지가 수신되었습니다.
내 MultiUserChat의 문제점은 무엇이며 여기서는 무슨 지연 배달이 있습니까?
감사합니다.
재미있는 방을 입력하면 채팅 역사의 특정 번호를 보내기 때문에, 내가 추가 할 수있는 모든 [상태이다 코드 101] (http://xmpp.org/registrar/mucstatus.html)은 "MUC/사용자 조합에 대한 제휴 변경"을 의미합니다. – Flow
흐름, 의견을 주셔서 감사합니다. 그러나 상태 코드 110은 101이 아니며 상태 코드 110이 있습니다. 상태 코드 110은 현재 상태 전송을 나타내며 사실입니다. – nizhney
IIRC, 이것은 Google 토크에서 이상한 행동으로, 간격을두고 사용자의 현재 상태를 다시 방송합니다. 이로 인해 방과 함께 기묘함이 발생합니다. – Zash