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?
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
});
...
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?