Salut utilisé dialogtates ejabberd protocole pour l'état de frappe. S'il vous plaît lire ce document pourrait être utile que vous XEP-0085: Chat State Notifications
Pour côté Android dont vous avez besoin pour mettre en œuvre le code suivant
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- tapez-chat-états-événement-dans-multi-utilisateur-chat-groupe/45814536 # 45814536 –
Merci pour la réponse @Sarthak Mittal, mais je ne vois pas la solution possible. La classe 'MessageEventManager' est en mode hérité dans Smack – jamarfal
Je vais mettre à jour ma réponse correctement dans le lien mentionné dans un jour ou deux, peu occupé en ce moment! :) –