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(); } }
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(); } }
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 (); } }