예제 #1
0
 public void OnDisconnected()
 {
     Log.Debug("ActRecognition", "Disconnected");
     client = null;
     // If the client was disconnected too early
     if (currentRequest != ConnectionUpdateRequest.None)
     {
         client = new ActivityRecognitionClient(context, this, this);
         client.Connect();
     }
 }
예제 #2
0
 public void SetTrackingEnabled(bool enabled, TrackingDelay desiredDelay = TrackingDelay.Long)
 {
     this.desiredDelay = desiredDelay;
     if (!enabled)
     {
         StopCurrentLocationTracking();
     }
     if (currentRequest != ConnectionUpdateRequest.None)
     {
         return;
     }
     currentRequest = enabled ? ConnectionUpdateRequest.Start : ConnectionUpdateRequest.Stop;
     if (client == null)
     {
         client = new ActivityRecognitionClient(context, this, this);
     }
     if (!(client.IsConnected || client.IsConnecting))
     {
         client.Connect();
     }
 }
예제 #3
0
 public void OnDisconnected()
 {
     Log.Debug ("ActRecognition", "Disconnected");
     client = null;
     // If the client was disconnected too early
     if (currentRequest != ConnectionUpdateRequest.None) {
         client = new ActivityRecognitionClient (context, this, this);
         client.Connect ();
     }
 }