Skip to content

sendMessage() has private access in ChatView #48

@sn-timothygoh

Description

@sn-timothygoh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions