summaryrefslogtreecommitdiff
path: root/same-android/src/main/java/com/orbekk/SameService.java
diff options
context:
space:
mode:
Diffstat (limited to 'same-android/src/main/java/com/orbekk/SameService.java')
-rw-r--r--same-android/src/main/java/com/orbekk/SameService.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/same-android/src/main/java/com/orbekk/SameService.java b/same-android/src/main/java/com/orbekk/SameService.java
index beb230f..18d7dee 100644
--- a/same-android/src/main/java/com/orbekk/SameService.java
+++ b/same-android/src/main/java/com/orbekk/SameService.java
@@ -100,6 +100,7 @@ public class SameService extends Service {
@Override
public IBinder onBind(Intent intent) {
+ logger.info("onBind()");
return messenger.getBinder();
}
@@ -109,17 +110,22 @@ public class SameService extends Service {
// TODO: Move this to the bound interface.
- if (intent.getAction().equals("create")) {
- } else if (intent.getAction().equals("join")) {
- String masterUrl = intent.getExtras().getString("masterUrl");
- sameController.joinNetwork(masterUrl);
- }
+// if (intent.getAction().equals("create")) {
+// } else if (intent.getAction().equals("join")) {
+// String masterUrl = intent.getExtras().getString("masterUrl");
+// sameController.joinNetwork(masterUrl);
+// }
return START_STICKY;
}
@Override
public void onCreate() {
logger.info("onCreate()");
+
+ // Ensure service is started.
+ Intent intent = new Intent(this, getClass());
+ startService(intent);
+
if (sameController == null) {
initializeConfiguration();
sameController = SameController.create(