Ejemplo n.º 1
0
        void activityDataValueChanged(GattCharacteristic sender, GattValueChangedEventArgs args)
        {
            if (args.CharacteristicValue == null)
            {
                return;
            }
            byte[] buffer = new byte[args.CharacteristicValue.Length];
            DataReader.FromBuffer(args.CharacteristicValue).ReadBytes(buffer);

            if (activityTracker != null)
            {
                activityTracker.Write(buffer, buffer.Length);
            }
            if (onActivityDataCallback != null)
            {
                onActivityDataCallback();
            }
        }