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 {@link rocks.xmpp.extensions.attention.model.Attention} extension.
xmppSession.addMessageListener(new MessageListener() { {@literal @}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);
@author Christian Schudt
|
|