입력 상태에 chatstates ejabberd 프로토콜이 사용되었습니다. 이 문서가 도움이 될 수 있습니다 읽어 보시기 바랍니다 당신의 안드로이드 측 XEP-0085: Chat State Notifications
당신은 다음 코드
Message msg= (Message) stanza;
// below ChatStateExtension for Compossing message.
ChatStateExtension state = (ChatStateExtension)msg.getExtension("http://jabber.org/protocol/chatstates");//jabber:x:event
// if state (ChatStateExtension) !=null and is composing then call listener method if not error.
if(state!=null) {
Log.d(AppConstants.ELEMENT,"ChatStateExtension : " + state.toXML());
if (state.getElementName().equals("composing")) {
if (msg.getType().equals(Message.Type.error)) {
return;
}
if (iCallBackForTypingListener != null) {
DelayInformation timestamp = (DelayInformation) msg.getExtension("delay", "urn:xmpp:delay");
if (timestamp == null)
timestamp = (DelayInformation) msg.getExtension("x", "jabber:x:delay");
if (timestamp != null && timestamp.getReason().equalsIgnoreCase("Offline Storage")){ //return if delay info is Offline Storage
return;
}
//update your typing listener
iCallBackForTypingListener.onTypingStanza(fromJID, typingSender);
}
// xmpp.updateChatState(fromJID, state.getElementName(), sender);
return;
} else if (state.getElementName().equals("paused")) {
return;
}
https://stackoverflow.com/questions/33479355/how-to-send-composing-is-를 구현해야 입력 - 채팅 - 상태 - 다중 사용자 채팅 그룹/45814536 # 45814536 –
답변을 주셔서 감사합니다 @ Sarthak Mittal,하지만 가능한 해결책을 볼 수 없습니다. 'MessageEventManager' 클래스는 Smack의 레거시 모드입니다. – jamarfal
2 ~ 3 일 안에 언급 된 링크에서 올바르게 답변을 업데이트 할 예정입니다. :) –