What I’m trying to do is listen for subscribe requests
According to the javadoc I need to setup a listener for presence packets,
I’m not sure how to do this and all the examples I’ve managed to find(I may not of found the right
combination of search terms yet) seem to be for previous versions so look to be doing something
else entirely
The closest I’ve come to finding examples of how to do this is the following
These are 9-14 years old and api looks like it has changed considerably since then
So if someone could point me to a example for the current version or could provide a example I would
really appreciate it
plus I needed to use that class with the listener on roster`
public void subscriptionRequestListener ()
{
System.out.println("Subscribe Request Received");
roster = Roster.getInstanceFor(connection);
roster.setSubscriptionMode(Roster.SubscriptionMode.manual);
Platform.runLater(new Runnable()
{
@Override
public void run()
{
SubscribePacketListener mySubscribeListener = new SubscribePacketListener();
roster.addSubscribeListener(mySubscribeListener);
}
});
}
Is there anything I missed?
Please be kind if your going to reply and remember no one was willing to offer help or
advice to me before on this issue, I’ve had to work this out the hard way, since I didn’t
know what I was looking for most of the time