Package apple.healthkit
Class HKWorkout
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.healthkit.HKObject
-
- apple.healthkit.HKSample
-
- apple.healthkit.HKWorkout
-
- All Implemented Interfaces:
NSCoding,NSSecureCoding,NSObject
public class HKWorkout extends HKSample
HKWorkout An HKObject subclass representing a workout or activity API-Since: 8.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHKWorkout(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()static HKWorkoutalloc()static HKWorkoutallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)@NotNull NSDictionary<? extends HKQuantityType,? extends HKStatistics>allStatistics()[@property] allStatistics A dictionary of statistics per quantity type during the workout This dictionary will contain HKStatistics objects containing the statistics by quantity sample type for all of the samples that have been added to the workout.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()doubleduration()[@property] duration The length of time that a workout was recording The duration is derived from the start and end dates of the workout and takes into account periods that the workout was paused.static longhash_static()HKWorkoutinit()HKWorkoutinitWithCoder(@NotNull NSCoder coder)NS_DESIGNATED_INITIALIZERstatic NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static HKWorkoutnew_objc()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)@Nullable HKStatisticsstatisticsForType(@NotNull HKQuantityType quantityType)statisticsForType: Returns an HKStatistics object containing the statistics for all the samples of the given type that have been added to the workout.static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()@Nullable HKQuantitytotalDistance()Deprecated.@Nullable HKQuantitytotalEnergyBurned()Deprecated.@Nullable HKQuantitytotalFlightsClimbed()Deprecated.@Nullable HKQuantitytotalSwimmingStrokeCount()Deprecated.static booleanuseStoredAccessor()Deprecated.static longversion_static()@NotNull NSArray<? extends HKWorkoutActivity>workoutActivities()[@property] workoutActivities An array of HKWorkoutActivities that were performed during a workout.longworkoutActivityType()[@property] workoutActivityType Represents the activity that the user was performing during a workout@Nullable NSArray<? extends HKWorkoutEvent>workoutEvents()[@property] workoutEvents An array of HKWorkoutEvents that occurred during a workout.static HKWorkoutworkoutWithActivityTypeStartDateEndDate(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate)Deprecated.static HKWorkoutworkoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate, double duration, @Nullable HKQuantity totalEnergyBurned, @Nullable HKQuantity totalDistance, @Nullable HKDevice device, @Nullable NSDictionary<java.lang.String,?> metadata)Deprecated.static HKWorkoutworkoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate, double duration, @Nullable HKQuantity totalEnergyBurned, @Nullable HKQuantity totalDistance, @Nullable NSDictionary<java.lang.String,?> metadata)Deprecated.static HKWorkoutworkoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate, @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable HKQuantity totalEnergyBurned, @Nullable HKQuantity totalDistance, @Nullable HKDevice device, @Nullable NSDictionary<java.lang.String,?> metadata)Deprecated.static HKWorkoutworkoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate, @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable HKQuantity totalEnergyBurned, @Nullable HKQuantity totalDistance, @Nullable NSDictionary<java.lang.String,?> metadata)Deprecated.static HKWorkoutworkoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate, @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable HKQuantity totalEnergyBurned, @Nullable HKQuantity totalDistance, @Nullable HKQuantity totalFlightsClimbed, @Nullable HKDevice device, @Nullable NSDictionary<java.lang.String,?> metadata)Deprecated.static HKWorkoutworkoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata(long workoutActivityType, @NotNull NSDate startDate, @NotNull NSDate endDate, @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable HKQuantity totalEnergyBurned, @Nullable HKQuantity totalDistance, @Nullable HKQuantity totalSwimmingStrokeCount, @Nullable HKDevice device, @Nullable NSDictionary<java.lang.String,?> metadata)Deprecated.-
Methods inherited from class apple.healthkit.HKSample
endDate, hasUndeterminedDuration, sampleType, startDate
-
Methods inherited from class apple.healthkit.HKObject
device, encodeWithCoder, metadata, source, sourceRevision, UUID
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static HKWorkout alloc()
-
allocWithZone
public static HKWorkout allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static HKWorkout new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
version_static
public static long version_static()
-
workoutWithActivityTypeStartDateEndDate
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDate(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate)
Deprecated.workoutWithActivityType:startDate:endDate:- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was ended API-Since: 8.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, double duration, @Nullable @Nullable HKQuantity totalEnergyBurned, @Nullable @Nullable HKQuantity totalDistance, @Nullable @Nullable HKDevice device, @Nullable @Nullable NSDictionary<java.lang.String,?> metadata)
Deprecated.workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:device:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was endedduration- The duration of the workout. If 0, the difference between startDate and endDate is used.totalEnergyBurned- The amount of energy that was burned during the workout. (Optional)totalDistance- The total distance that was traveled during the workout. (Optional)device- The HKDevice associated with the workout. (Optional)metadata- Metadata for the workout. (Optional) API-Since: 9.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, double duration, @Nullable @Nullable HKQuantity totalEnergyBurned, @Nullable @Nullable HKQuantity totalDistance, @Nullable @Nullable NSDictionary<java.lang.String,?> metadata)
Deprecated.workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was endedduration- The duration of the workout. If 0, the difference between startDate and endDate is used.totalEnergyBurned- The amount of energy that was burned during the workout. (Optional)totalDistance- The total distance that was traveled during the workout. (Optional)metadata- Metadata for the workout. (Optional) API-Since: 8.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, @Nullable @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable @Nullable HKQuantity totalEnergyBurned, @Nullable @Nullable HKQuantity totalDistance, @Nullable @Nullable HKDevice device, @Nullable @Nullable NSDictionary<java.lang.String,?> metadata)
Deprecated.workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was endedworkoutEvents- An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)totalEnergyBurned- The amount of energy that was burned during the workout. (Optional)totalDistance- The total distance that was traveled during the workout. (Optional)device- The HKDevice associated with the workout. (Optional)metadata- Metadata for the workout. (Optional) API-Since: 9.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, @Nullable @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable @Nullable HKQuantity totalEnergyBurned, @Nullable @Nullable HKQuantity totalDistance, @Nullable @Nullable NSDictionary<java.lang.String,?> metadata)
Deprecated.workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was endedworkoutEvents- An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)totalEnergyBurned- The amount of energy that was burned during the workout. (Optional)totalDistance- The total distance that was traveled during the workout. (Optional)metadata- Metadata for the workout. (Optional) API-Since: 8.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, @Nullable @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable @Nullable HKQuantity totalEnergyBurned, @Nullable @Nullable HKQuantity totalDistance, @Nullable @Nullable HKQuantity totalSwimmingStrokeCount, @Nullable @Nullable HKDevice device, @Nullable @Nullable NSDictionary<java.lang.String,?> metadata)
Deprecated.workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalSwimmingStrokeCount:device:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was endedworkoutEvents- An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)totalEnergyBurned- The amount of energy that was burned during the workout. (Optional)totalDistance- The total distance that was traveled during the workout. (Optional)totalSwimmingStrokeCount- The total count of swimming strokes that was accumulated during the workout. (Optional)device- The HKDevice associated with the workout. (Optional)metadata- Metadata for the workout. (Optional) API-Since: 10.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
duration
public double duration()
[@property] duration The length of time that a workout was recording The duration is derived from the start and end dates of the workout and takes into account periods that the workout was paused. Periods that the workout was paused are based off of the workoutEvents property.
-
initWithCoder
public HKWorkout initWithCoder(@NotNull @NotNull NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding- Overrides:
initWithCoderin classHKSample
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.- Specified by:
_supportsSecureCodingin interfaceNSSecureCoding- Overrides:
_supportsSecureCodingin classHKSample
-
totalDistance
@Nullable @Deprecated public @Nullable HKQuantity totalDistance()
Deprecated.[@property] totalDistance The total distance that was traveled during a workout This metric should represent the total distance traveled during the course of the workout. It should be a quantity with a unit representing length. API-Since: 8.0 Deprecated-Since: 100000.0 Deprecated-Message: Use statisticsForType: passing the HKQuantityType for the desired distance type
-
totalEnergyBurned
@Nullable @Deprecated public @Nullable HKQuantity totalEnergyBurned()
Deprecated.[@property] totalEnergyBurned The amount of energy that was burned during a workout This metric should represent the total active energy burned during the course of the workout. It should be a quantity with a unit representing energy. API-Since: 8.0 Deprecated-Since: 100000.0 Deprecated-Message: Use statisticsForType: passing the HKQuantityType for HKQuantityTypeIdentifierActiveEnergyBurned
-
totalSwimmingStrokeCount
@Nullable @Deprecated public @Nullable HKQuantity totalSwimmingStrokeCount()
Deprecated.[@property] totalSwimmingStrokeCount The total count of swimming strokes that was accumulated during a workout This metric should represent the total count of swimming strokes accumulated during the course of the workout. It should be a quantity with a unit representing count. API-Since: 10.0 Deprecated-Since: 100000.0 Deprecated-Message: Use statisticsForType: passing the HKQuantityType for HKQuantityTypeIdentifierSwimmingStrokeCount
-
workoutActivityType
public long workoutActivityType()
[@property] workoutActivityType Represents the activity that the user was performing during a workout
-
workoutEvents
@Nullable public @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents()
[@property] workoutEvents An array of HKWorkoutEvents that occurred during a workout. These events will be ordered by date in ascending order. All events must take place between the start date and end date of the workout. The first workout event should never be a resume event because it is assumed that the workout begins in a running state.
-
totalFlightsClimbed
@Nullable @Deprecated public @Nullable HKQuantity totalFlightsClimbed()
Deprecated.[@property] totalFlightsClimbed The total count of flights climbed during a workout This metric should represent the total count of flights accumulated during the course of the workout. It should be a quantity with a unit representing count. API-Since: 11.0 Deprecated-Since: 100000.0 Deprecated-Message: Use statisticsForType: passing the HKQuantityType for HKQuantityTypeIdentifierFlightClimbed
-
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata
@Deprecated public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata(long workoutActivityType, @NotNull @NotNull NSDate startDate, @NotNull @NotNull NSDate endDate, @Nullable @Nullable NSArray<? extends HKWorkoutEvent> workoutEvents, @Nullable @Nullable HKQuantity totalEnergyBurned, @Nullable @Nullable HKQuantity totalDistance, @Nullable @Nullable HKQuantity totalFlightsClimbed, @Nullable @Nullable HKDevice device, @Nullable @Nullable NSDictionary<java.lang.String,?> metadata)
Deprecated.workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalFlightsClimbed:device:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.- Parameters:
workoutActivityType- The activity type of the workoutstartDate- The point in time that the workout was startedendDate- The point in time that the workout was endedworkoutEvents- An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)totalEnergyBurned- The amount of energy that was burned during the workout. (Optional)totalDistance- The total distance that was traveled during the workout. (Optional)totalFlightsClimbed- The total count of flights climbed that was accumulated during the workout. (Optional)device- The HKDevice associated with the workout. (Optional)metadata- Metadata for the workout. (Optional) API-Since: 11.0 Deprecated-Since: 17.0 Deprecated-Message: Use HKWorkoutBuilder
-
allStatistics
@NotNull public @NotNull NSDictionary<? extends HKQuantityType,? extends HKStatistics> allStatistics()
[@property] allStatistics A dictionary of statistics per quantity type during the workout This dictionary will contain HKStatistics objects containing the statistics by quantity sample type for all of the samples that have been added to the workout. API-Since: 16.0
-
statisticsForType
@Nullable public @Nullable HKStatistics statisticsForType(@NotNull @NotNull HKQuantityType quantityType)
statisticsForType: Returns an HKStatistics object containing the statistics for all the samples of the given type that have been added to the workout. If there are no samples of the given type then nil is returned.- Parameters:
quantityType- The quantity type to gather statistics about. API-Since: 16.0
-
workoutActivities
@NotNull public @NotNull NSArray<? extends HKWorkoutActivity> workoutActivities()
[@property] workoutActivities An array of HKWorkoutActivities that were performed during a workout. These activities will be ordered by date in ascending order. All activities must take place between the start date and end date of the workout. API-Since: 16.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-