]> Pileus Git - ~andy/iBeaconNav/blobdiff - src/edu/ucla/iBeaconNav/Task.java
Add connect/disconnect and iBeacon data
[~andy/iBeaconNav] / src / edu / ucla / iBeaconNav / Task.java
index c3def77fb4084f7bf983312466f94ab97626fe79..ac248378863d7c010d8e16b72060554ce6d521a9 100644 (file)
@@ -79,15 +79,17 @@ public class Task extends Service
                        case CONNECT:
                                Util.debug("Task: handle - connect");
                                this.running = true;
+                               this.beacon.connect();
+                               this.sensors.connect();
                                this.notify("Connected", android.R.drawable.presence_online);
-                               //this.ibeacon.setBackgroundMode(this, false);
                                break;
 
                        // Stop client thread
                        case DISCONNECT:
                                Util.debug("Task: handle - register");
-                               //this.ibeacon.setBackgroundMode(this, true);
                                this.running = false;
+                               this.beacon.disconnect();
+                               this.sensors.disconnect();
                                this.stopForeground(true);
                                break;