/** end the game but not yet exit, still stay in the game activity */ public static void endGame() { Client.deactivate(); Server.stop(); Client.stop(); ClientGameState.clear(); if (BallCraft.isServer) { ServerGameState.clear(); } GameRenderer.stopRendering(); ServerAdapter.stopBTService(); Intent intent = new Intent(self, EndGameMenu.class); intent.putExtra("selfScore", selfScore); intent.putExtra("enemyScore", enemyScore); self.startActivity(intent); self.finish(); self.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); }