public void sendMessage ( Message message ) throws NotConnectedException , InterruptedException { // Force the recipient, message type, and thread ID since the user elected // to send the message through this chat object. message . setTo ( participant ) ; message . setType ( Message . Type . chat ) ; message . setThread ( threadID ) ; chatManager . sendMessage ( this , message ) ; }
Sends a message to the other chat participant . The thread ID recipient and message type of the message will automatically set to those of this chat .