android-chat-ui
android-chat-ui copied to clipboard
sendMessage() has private access in ChatView
Below are the code I wrote and is used to test if message can be sent
` private ChatView mChatView; private SendButton mSendButton
...
mSendButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (RoosterConnectionService.getState().equals(RoosterConnection.ConnectionState.CONNECTED)) { Log.d(TAG, "The client is connected to server, sending message"); // send message to server
Intent sendIntent = new Intent(RoosterConnectionService.SEND_MESSAGE);
sendIntent.putExtra(RoosterConnectionService.BUNDLE_MESSAGE_BODY, mChatView.getTypedMessage());
sendIntent.putExtra(RoosterConnectionService.BUNDLE_TO, contactJid);
sendBroadcast(sendIntent);
mChatView.sendMessage();
}
}
});
...
So at the end there, I got a red line beneath the
sendMessage()function telling me that
sendMessage(java.lang.String, long) has private access in 'co.intentservice.chatui.ChatView'.
Is there any other method for sending message?