public final class AttentionManager extends ExtensionManager
This feature is known as 'nudge' or 'buzz' in some non-XMPP IM protocols.
If you want to listen for incoming attention requests, listen for incoming messages and check if they have the Attention extension.
xmppSession.addMessageListener(new MessageListener() {
@Override
public void handle(MessageEvent e) {
if (e.isIncoming() && e.getMessage().getExtension(Attention.class) != null) {
// Handle attention request.
}
}
});
If you use attentions, enable this manager class, in order to register this extension in service discovery:
xmppSession.getExtensionManager(AttentionManager.class).setEnabled(true);
features, xmppSession| Modifier and Type | Method and Description |
|---|---|
void |
captureAttention(rocks.xmpp.core.Jid jid)
Captures the attention of another user.
|
setEnabledCopyright © 2014 XMPP.rocks. All rights reserved.