public virtual bool onMessageReadyToSend(ChatMessage msg) { Log.d(LOGTAG, "TextChat listener: onMessageReadyToSend: " + msg.Text); if (mSession != null) { mSession.sendSignal(SIGNAL_TYPE, msg.Text); } return(msgError); }
public override void onSignalReceived(Session session, string type, string data, Connection connection) { Log.d(LOGTAG, "onSignalReceived. Type: " + type + " data: " + data); ChatMessage msg = null; if (!connection.ConnectionId.Equals(mSession.Connection.ConnectionId)) { // The signal was sent from another participant. The sender ID is set to the sender's // connection ID. The sender alias is the value added as connection data when you // created the user's token. msg = new ChatMessage(connection.ConnectionId, connection.Data, data); // Add the new ChatMessage to the text-chat component mTextChatFragment.addMessage(msg); } }
public virtual bool onMessageReadyToSend(ChatMessage msg) { Log.d(LOGTAG, "TextChat listener: onMessageReadyToSend: " + msg.Text); if (mSession != null) { mSession.sendSignal(SIGNAL_TYPE, msg.Text); } return msgError; }