android-chat-ui icon indicating copy to clipboard operation
android-chat-ui copied to clipboard

sendMessage() has private access in ChatView

Open sn-timothygoh opened this issue 4 years ago • 0 comments

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 thesendMessage()function telling me thatsendMessage(java.lang.String, long) has private access in 'co.intentservice.chatui.ChatView'. Is there any other method for sending message?

sn-timothygoh avatar Nov 24 '20 15:11 sn-timothygoh