public class HKWorkout extends HKSample
An HKObject subclass representing a workout or activity
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
HKWorkout(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
static HKWorkout |
alloc() |
static HKWorkout |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
double |
duration()
[@property] duration
|
static long |
hash_static() |
HKWorkout |
init() |
HKWorkout |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static HKWorkout |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
HKQuantity |
totalDistance()
[@property] totalDistance
|
HKQuantity |
totalEnergyBurned()
[@property] totalEnergyBurned
|
HKQuantity |
totalFlightsClimbed()
[@property] totalFlightsClimbed
|
HKQuantity |
totalSwimmingStrokeCount()
[@property] totalSwimmingStrokeCount
|
static long |
version_static() |
long |
workoutActivityType()
[@property] workoutActivityType
|
NSArray<? extends HKWorkoutEvent> |
workoutEvents()
[@property] workoutEvents
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDate(long workoutActivityType,
NSDate startDate,
NSDate endDate)
workoutWithActivityType:startDate:endDate:
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType,
NSDate startDate,
NSDate endDate,
double duration,
HKQuantity totalEnergyBurned,
HKQuantity totalDistance,
HKDevice device,
NSDictionary<java.lang.String,?> metadata)
workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:device:metadata:
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType,
NSDate startDate,
NSDate endDate,
double duration,
HKQuantity totalEnergyBurned,
HKQuantity totalDistance,
NSDictionary<java.lang.String,?> metadata)
workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata:
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType,
NSDate startDate,
NSDate endDate,
NSArray<? extends HKWorkoutEvent> workoutEvents,
HKQuantity totalEnergyBurned,
HKQuantity totalDistance,
HKDevice device,
NSDictionary<java.lang.String,?> metadata)
workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType,
NSDate startDate,
NSDate endDate,
NSArray<? extends HKWorkoutEvent> workoutEvents,
HKQuantity totalEnergyBurned,
HKQuantity totalDistance,
NSDictionary<java.lang.String,?> metadata)
workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata(long workoutActivityType,
NSDate startDate,
NSDate endDate,
NSArray<? extends HKWorkoutEvent> workoutEvents,
HKQuantity totalEnergyBurned,
HKQuantity totalDistance,
HKQuantity totalFlightsClimbed,
HKDevice device,
NSDictionary<java.lang.String,?> metadata)
workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalFlightsClimbed:device:metadata:
|
static HKWorkout |
workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata(long workoutActivityType,
NSDate startDate,
NSDate endDate,
NSArray<? extends HKWorkoutEvent> workoutEvents,
HKQuantity totalEnergyBurned,
HKQuantity totalDistance,
HKQuantity totalSwimmingStrokeCount,
HKDevice device,
NSDictionary<java.lang.String,?> metadata)
workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalSwimmingStrokeCount:device:metadata:
|
endDate, hasUndeterminedDuration, sampleType, startDatedevice, encodeWithCoder, metadata, source, sourceRevision, UUIDaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static HKWorkout alloc()
public static HKWorkout allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static HKWorkout new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static boolean supportsSecureCoding()
public static long version_static()
public static HKWorkout workoutWithActivityTypeStartDateEndDate(long workoutActivityType, NSDate startDate, NSDate endDate)
workoutActivityType - The activity type of the workoutstartDate - The point in time that the workout was startedendDate - The point in time that the workout was endedpublic static HKWorkout workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType, NSDate startDate, NSDate endDate, double duration, HKQuantity totalEnergyBurned, HKQuantity totalDistance, HKDevice device, NSDictionary<java.lang.String,?> 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.
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)public static HKWorkout workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType, NSDate startDate, NSDate endDate, double duration, HKQuantity totalEnergyBurned, HKQuantity totalDistance, NSDictionary<java.lang.String,?> 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.
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)public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata(long workoutActivityType, NSDate startDate, NSDate endDate, NSArray<? extends HKWorkoutEvent> workoutEvents, HKQuantity totalEnergyBurned, HKQuantity totalDistance, HKDevice device, NSDictionary<java.lang.String,?> 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.
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)public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata(long workoutActivityType, NSDate startDate, NSDate endDate, NSArray<? extends HKWorkoutEvent> workoutEvents, HKQuantity totalEnergyBurned, HKQuantity totalDistance, NSDictionary<java.lang.String,?> 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.
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)public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata(long workoutActivityType, NSDate startDate, NSDate endDate, NSArray<? extends HKWorkoutEvent> workoutEvents, HKQuantity totalEnergyBurned, HKQuantity totalDistance, HKQuantity totalSwimmingStrokeCount, HKDevice device, NSDictionary<java.lang.String,?> 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.
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)public double 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.
public HKWorkout initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodinginitWithCoder in class HKSamplepublic boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCoding_supportsSecureCoding in class HKSamplepublic HKQuantity 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.
public HKQuantity 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.
public HKQuantity 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.
public long workoutActivityType()
Represents the activity that the user was performing during a workout
public NSArray<? extends HKWorkoutEvent> 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.
public HKQuantity 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.
public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata(long workoutActivityType, NSDate startDate, NSDate endDate, NSArray<? extends HKWorkoutEvent> workoutEvents, HKQuantity totalEnergyBurned, HKQuantity totalDistance, HKQuantity totalFlightsClimbed, HKDevice device, NSDictionary<java.lang.String,?> 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.
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)