@Override protected void onCreate(Bundle savedInstanceState) { Log.e(TAG, "onCreate"); super.onCreate(savedInstanceState); MyAppApplication myApp = ((MyAppApplication) getApplicationContext()); mGoogleApiClient = myApp.getClient(); room = myApp.getRoom(); mRoomId = room.getRoomId(); mParticipants = room.getParticipants(); Intent i = getIntent(); myself = (Player) i.getSerializableExtra("myself"); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new CatMath(this, myself), config); // updated by siyuan myId = room.getParticipantId(Games.Players.getCurrentPlayerId(myApp.getClient())); GameWorld.isOwner = isServer(); Log.e("isOwner:", String.valueOf(GameWorld.isOwner)); playerMap.put(myId, 1); GameWorld.numberOfPlayers = mParticipants.size(); Log.e(TAG, "onCreate ends"); } // end of onCreate