Java 类org.jivesoftware.smackx.chatstates.ChatStateManager 实例源码

项目:Zom-Android    文件:XmppConnection.java   
private void sendChatState (String to, ChatState currentChatState)
{
    try {
        if (mConnection != null && mConnection.isConnected())
        {
           // findOrCreateSession(to, false);
            Chat thisChat = mChatManager.createChat(JidCreate.from(to).asEntityJidIfPossible());
            ChatStateManager.getInstance(mConnection).setCurrentState(currentChatState, thisChat);
        }
    }
    catch (Exception e)
    {
        Log.w(ImApp.LOG_TAG,"error sending chat state: " + e.getMessage());
    }
}