2015-04-03 59 views

回答

1

當發送可存在於該組,您可以設置MaxStanzas爲0,以避免越來越老了羣消息

Presence presence = new Presence(Presence.Type.available); 
presence.setTo(roomJID); 

//Setting MaxStanzas to 0 
MUCInitialPresence m = new MUCInitialPresence(); 
History h = new History(); 
h.setMaxStanzas(0); 
m.setHistory(h); 
presence.addExtension(m); 

try { 
    connection.sendStanza(presence); 
} catch (NotConnectedException e) { 
} 
+0

是的,我知道。但項目有點不同。這不是關於發送短信,而是發送座標。所以我需要在成功交談後刪除cordinates – sovon 2015-05-11 15:22:24

+0

@sovon你有沒有想過一個出路?謝謝 – Luccas 2015-10-07 03:34:08

+0

nope,我沒有找到任何選項來做到這一點。 – sovon 2015-11-01 12:49:12

相關問題