public async void ConnectWithBand() { pairedBands = await BandClientManager.Instance.GetBandsAsync(); bandClient = await BandClientManager.Instance.ConnectAsync(pairedBands[0]); if (bandClient.SensorManager.HeartRate.GetCurrentUserConsent() != UserConsent.Granted) { await bandClient.SensorManager.HeartRate.RequestUserConsentAsync(); } currentBand = new BandInformation(); await currentBand.RetrieveInfo(pairedBands[0], bandClient); bandClient.SensorManager.HeartRate.ReadingChanged += HeartRateReceived; await bandClient.SensorManager.HeartRate.StartReadingsAsync(); }
public async void ConnectWithBand() { pairedBands = await BandClientManager.Instance.GetBandsAsync(); bandClient = await BandClientManager.Instance.ConnectAsync(pairedBands[0]); if (bandClient.SensorManager.HeartRate.GetCurrentUserConsent() != UserConsent.Granted) { await bandClient.SensorManager.HeartRate.RequestUserConsentAsync(); } currentBand = new BandInformation(); await currentBand.RetrieveInfo(pairedBands[0], bandClient); bandClient.SensorManager.HeartRate.ReadingChanged += HeartRateReceived; await bandClient.SensorManager.HeartRate.StartReadingsAsync(); }