i have integrated google play game service successfully. i am using multi-player feature of this service. now i am facing an issue.
after successfully creation of game room and receiving call back in onRoomCreated() method
@Override
public void onRoomCreated(int statusCode, Room room) {
Log.d(TAG, "onRoomCreated(" + statusCode + ", " + room + ")");
if (statusCode != GamesClient.STATUS_OK) {
Log.e(TAG, "*** Error: onRoomCreated, status " + statusCode);
showGameError();
return;
}
// show the waiting room UI
final int MIN_PLAYERS = 2;
Intent i = getGamesClient().getRealTimeWaitingRoomIntent(room, MIN_PLAYERS);
startActivityForResult(i, RC_WAITING_ROOM);
// here i want to add timer ***
}
here i want to add timer. after a specific time i want to forcefully start the game play if there is minimum 2 user in the room. how can i achieve this.
i want to start the game after specific time which starts after onRoomConnected(int statusCode, Room room) call-back method.
google play service starts the game after specific user count which we mention in MIN_PLAYERS. but i want to start the game after specific time not after specific user count
getGamesClient().getRealTimeWaitingRoomIntent(room, MIN_PLAYERS);