diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-18 12:43:18 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-18 12:43:18 +0100 |
commit | e048c5caf68df2b162c8f8f3d186f79fc5f59b57 (patch) | |
tree | f545ef7e911534e91f5d820b716c514bc398fde8 /same-android/src/main/java/com | |
parent | eae8848dd1484da88bbe09b7e16877dfdf7f78bb (diff) |
Fix race condition.
When new client joins: Add new participant to participants list before
broadcasting new state.
Diffstat (limited to 'same-android/src/main/java/com')
-rw-r--r-- | same-android/src/main/java/com/orbekk/HelloAndroidActivity.java | 14 |
1 files changed, 7 insertions, 7 deletions
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 |