From e048c5caf68df2b162c8f8f3d186f79fc5f59b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Wed, 18 Jan 2012 12:43:18 +0100 Subject: Fix race condition. When new client joins: Add new participant to participants list before broadcasting new state. --- .../src/main/java/com/orbekk/HelloAndroidActivity.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'same-android/src/main/java/com') diff --git a/same-android/src/main/java/com/orbekk/HelloAndroidActivity.java b/same-android/src/main/java/com/orbekk/HelloAndroidActivity.java index 653a870..cc90a3a 100644 --- a/same-android/src/main/java/com/orbekk/HelloAndroidActivity.java +++ b/same-android/src/main/java/com/orbekk/HelloAndroidActivity.java @@ -25,16 +25,16 @@ public class HelloAndroidActivity extends Activity { System.setProperty("java.net.preferIPv6Addresses", "false"); Log.i(TAG, "onCreate"); - setContentView(R.layout.main); - + // setContentView(R.layout.main); + setContentView(new GameView(this)); // Broadcast broadcast = new Broadcast(this); // broadcast.sendBroadcast("Broadcast test".getBytes(), 10010); - Broadcaster broadcaster = new Broadcaster(); - Log.i(TAG, "Broadcast success: " + broadcaster.sendBroadcast(10010, "Broadcast test from Android".getBytes())); - - ClientApp client = new ClientApp(); - client.run(10015, "ClientNetwork", "http://10.0.0.6:10010/"); +// Broadcaster broadcaster = new Broadcaster(); +// Log.i(TAG, "Broadcast success: " + broadcaster.sendBroadcast(10010, "Broadcast test from Android".getBytes())); +// +// ClientApp client = new ClientApp(); +// client.run(10015, "ClientNetwork", "http://10.0.0.6:10010/"); } @Override -- cgit v1.2.3