Can i get online users in my friend list via Smack API? Is it possible?
I am working on app which have chat between users. I had successfully created chat applicatio
smackAndroid = SmackAndroid.init(this);
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
@Override
public void connectionCreated(XMPPConnection connection) {
Log.i("hello", "receive xmpp connection : " + connection);
roster = connection.getRoster();
try {
roster.createEntry("2868254", "hello", null);
} catch (XMPPException e) {
e.printStackTrace();
} catch (NotLoggedInException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoResponseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotConnectedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});