I am creating an android chat application using a smack open fire. The problem that I am facing is I know how to send and accept subscription requests but how can I know if I have received any subscription request. I have used Stanza listener but the listener is only listening to incoming chat messages, not subscription requests. Below is my code
StanzaFilter filter=new StanzaTypeFilter(Message.class);
PacketCollector collector=connection.createPacketCollector(filter);
connection.addAsyncStanzaListener(new StanzaListener() {
@Override
public void processPacket(Stanza packet) throws SmackException.NotConnectedException {
Log.wtf("MA","Stanz listner");
}
},filter);
I am a beginner in smack, please help me how can I listen for incoming subscription request. Thanks in advance.