private void RefreshCharacteristicValue(NSString characteristicTypeKey, HKCharacteristicType characteristicType)
        {
            if (characteristicTypeKey == HKCharacteristicTypeIdentifierKey.BiologicalSex)
            {
                NSError error         = null;
                var     biologicalSex = HealthStore.GetBiologicalSex(out error);
                if (error == null)
                {
                    DispatchQueue.MainQueue.DispatchAsync(() => {
                        var dataStore = StateDispatcher <HealthState> .State;

                        HealthStateMutator.MutateBiologicalSex(
                            dataStore, () => GetDisplayableBiologicalSex(biologicalSex.BiologicalSex));

                        StateDispatcher <HealthState> .Refresh();
                    });
                }
            }
        }
 public iOSHealthKitBirthdateProbe()
     : base(HKCharacteristicType.Create(HKCharacteristicTypeIdentifier.DateOfBirth))
 {
 }
 public iOSHealthKitBloodTypeProbe()
     : base(HKCharacteristicType.Create(HKCharacteristicTypeIdentifier.BloodType))
 {
 }
Beispiel #4
0
 public iOSHealthKitBiologicalSexProbe()
     : base(HKCharacteristicType.Create(HKCharacteristicTypeIdentifier.BiologicalSex))
 {
 }
Beispiel #5
0
 public HealthKitData(HKCharacteristicTypeIdentifier identifier)
 {
     HKType = HKTypes.Characteristic;
     CharacteristicTypeIdentifier = identifier;
     Permission = HKCharacteristicType.Create(identifier);
 }
Beispiel #6
0
 public iOSHealthKitFitzpatrickSkinTypeProbe()
     : base(HKCharacteristicType.Create(HKCharacteristicTypeIdentifier.FitzpatrickSkinType))
 {
 }
Beispiel #7
0
 public iOSHealthKitWheelChairUseProbe()
     : base(HKCharacteristicType.Create(HKCharacteristicTypeIdentifier.WheelchairUse))
 {
 }