Android RealTimeMultiplayer onRoomCreated getting status 2 : STATUS_CLIENT_RECONNECT_REQUIRED

▼魔方 西西 提交于 2019-12-10 18:06:13

问题


I am trying to setup realtime multiplayer in my Android Game. However, when I call Games.RealTimeMultiplayer.create(googleApiClient, roomConfig); after selecting the players.

However every time onRoomCreated is called with status STATUS_CLIENT_RECONNECT_REQUIRED and room 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);
}

I have tried a number of things before asking this:

  1. Yes I checked my Google Play Developer Console, the Realtime Multiplayer Settings is ON in the Linked Apps
  2. The APK installed is with a valid sign key, I have the debug key-store as valid.
  3. Looked through the documentation, but I couldn't figure out why this is happening.

Would love some help :)

来源:https://stackoverflow.com/questions/44738993/android-realtimemultiplayer-onroomcreated-getting-status-2-status-client-recon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!