我正在使用 openfire 和 asmack lib。我正在 Android 聊天应用程序中实现在线和离线按钮。如何将我的状态设置为“不可用”。
注意:我不想使用 connection.disconnect() 方法,因为 **
This method cleans up all resources used by the connection. Therefore, the roster, listeners and other stateful objects cannot be re-used by simply calling connect() on this connection again. This is unlike the behavior during unexpected disconnects (and subsequent connections). In that case, all state is preserved to allow for more seamless error recovery.
**
但是当我单击在线按钮时,我需要重用花名册和听众。那我该怎么办。
最佳答案
您可以发送不可用的状态。它是:new Presence(Type.unavaiable);
我为我工作
关于android - 使用 asmack 设置状态不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17939973/