在这里,我使用以下代码发送消息。我添加了回调侦听器以了解消息状态,但它不打印任何日志消息。
gamesClient.sendReliableRealTimeMessage(new RealTimeReliableMessageSentListener() {
@Override
public void onRealTimeMessageSent(int statusCode, int tokenId, String recipientParticipantId) {
// TODO Auto-generated method stub
switch (statusCode) {
case GamesClient.STATUS_OK:
Log.e("status", "STATUS_OK");
break;
case GamesClient.STATUS_REAL_TIME_MESSAGE_SEND_FAILED:
Log.e("status", "STATUS_REAL_TIME_MESSAGE_SEND_FAILED");
break;
case GamesClient.STATUS_REAL_TIME_ROOM_NOT_JOINED:
Log.e("status", "STATUS_REAL_TIME_ROOM_NOT_JOINED");
break;
}
}
}, msgBuf, roomId, p.getParticipantId());