Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }