我正在尝试在Android游戏中设置实时多人游戏。但是,当我在选择球员后调用Games.RealTimeMultiplayer.create(googleApiClient, roomConfig);
时。
但是,每次onRoomCreated
调用状态为STATUS_CLIENT_RECONNECT_REQUIRED
且房间为null
时:
@Override
public void onRoomCreated(int statusCode, Room room) {
if (statusCode == STATUS_CLIENT_RECONNECT_REQUIRED) {
// This gets called repeatedly
reconnectGoogleLogin();
return;
} else if (statusCode != GamesStatusCodes.STATUS_OK) {
disableAlwaysOnScreen();
return;
}
Intent i = Games.RealTimeMultiplayer.getWaitingRoomIntent(
googleApiClient, room, MIN_NUMBER_OF_PLAYERS);
startActivityForResult(i, RC_WAITING_ROOM);
}
在问这个问题之前,我尝试过很多东西:
会喜欢一些帮助:)