Search code examples
androidquickblox

Send presence while not chatting with anyone


What is the best way to send presence to the server. Currently I am using multiple times QBAuth.createSession(this); but I think there should be abetter way to send presence then to auth/login every time?

P.S. I don't want to connect with any user to send my presence status.


Solution

  • Presence presence = new Presence(Presence.Type.available);
    con.sendPacket(presence);
    

    http://www.igniterealtime.org/builds/smack/docs/latest/documentation/gettingstarted.html