summaryrefslogtreecommitdiff
path: root/same-android/src/main/java/com/orbekk
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-27 15:00:01 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-27 15:00:01 +0100
commitfe19c8b73039d27676a7f8f80ed3bb0dfa9e2278 (patch)
treea6e3d3e46cc39086d486b996fa2f5353f028542c /same-android/src/main/java/com/orbekk
parenta1abc25b91760fce29c0bd94f60e1ee592a151cc (diff)
Clean up SameService.
– Only send broadcasts. – Don't start Same components without SameController.
Diffstat (limited to 'same-android/src/main/java/com/orbekk')
-rw-r--r--same-android/src/main/java/com/orbekk/discovery/SameService.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/same-android/src/main/java/com/orbekk/discovery/SameService.java b/same-android/src/main/java/com/orbekk/discovery/SameService.java
index 68a6c0b..19df9e3 100644
--- a/same-android/src/main/java/com/orbekk/discovery/SameService.java
+++ b/same-android/src/main/java/com/orbekk/discovery/SameService.java
@@ -60,21 +60,17 @@ public class SameService extends Service {
discoveryThread.start();
}
}
- new Thread() {
- @Override public void run() {
- new MasterApp().run(PORT+1);
- }
- }.start();
}
private void sendBroadcastDiscovery() {
- byte[] data = "Discover".getBytes();
+ String message = "Discover " + (PORT + 2);
+ byte[] data = message.getBytes();
new Broadcaster(this).sendBroadcast(data, PORT);
}
private void joinNetwork() {
sendBroadcastDiscovery();
- new ClientApp().run(PORT+2, "ClientNetwork", null);
+ // new ClientApp().run(PORT+2, "ClientNetwork", null);
}
@Override