NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
HKHealthStore(org.moe.natj.general.Pointer peer) |
accessibilityActivate, 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 HKHealthStore alloc()
public static HKHealthStore 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 isHealthDataAvailable()
Returns YES if HealthKit is supported on the device.
HealthKit is not supported on all iOS devices. Using HKHealthStore APIs on devices which are not supported will result in errors with the HKErrorHealthDataUnavailable code. Call isHealthDataAvailable before attempting to use other parts of the framework.
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static HKHealthStore 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 long version_static()
public void addSamplesToWorkoutCompletion(NSArray<? extends HKSample> samples, HKWorkout workout, HKHealthStore.Block_addSamplesToWorkoutCompletion completion)
Associates samples with a given workout.
This will associate the given samples with the given workout. These samples will then be returned by a query that contains this workout as a predicate. If a sample is added that is not saved yet, then it will be saved for you. Note that the sample will be saved without an HKDevice.
The workout provided must be one that has already been saved to HealthKit.
public long authorizationStatusForType(HKObjectType type)
Returns the application's authorization status for the given object type.
public HKBiologicalSexObject biologicalSexWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
Returns an object encapsulating the user's biological sex.
Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierBiologicalSex.
public HKBloodTypeObject bloodTypeWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
Returns an object encapsulating the user's blood type.
Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierBloodType.
public NSDateComponents dateOfBirthComponentsWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
Returns the user's date of birth in the Gregorian calendar.
Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierDateOfBirth.
public NSDate dateOfBirthWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
public void deleteObjectWithCompletion(HKObject object, HKHealthStore.Block_deleteObjectWithCompletion completion)
Deletes a single HKObject from the HealthKit database.
See deleteObjects:withCompletion:.
public void deleteObjectsWithCompletion(NSArray<? extends HKObject> objects, HKHealthStore.Block_deleteObjectsWithCompletion completion)
Deletes multiple HKObjects from the HealthKit database.
An application may only delete objects that it previously saved. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.
public void deleteObjectsOfTypePredicateWithCompletion(HKObjectType objectType, NSPredicate predicate, HKHealthStore.Block_deleteObjectsOfTypePredicateWithCompletion completion)
Deletes all objects matching the given predicate from the HealthKit database.
An application may only delete objects that it previously saved. This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.
public void disableAllBackgroundDeliveryWithCompletion(HKHealthStore.Block_disableAllBackgroundDeliveryWithCompletion completion)
public void disableBackgroundDeliveryForTypeWithCompletion(HKObjectType type, HKHealthStore.Block_disableBackgroundDeliveryForTypeWithCompletion completion)
public NSDate earliestPermittedSampleDate()
Samples prior to the earliestPermittedSampleDate cannot be saved or queried.
On some platforms, only samples with end dates newer than the value returned by earliestPermittedSampleDate may be saved or retrieved.
public void enableBackgroundDeliveryForTypeFrequencyWithCompletion(HKObjectType type, long frequency, HKHealthStore.Block_enableBackgroundDeliveryForTypeFrequencyWithCompletion completion)
This method enables activation of your app when data of the type is recorded at the cadence specified.
When an app has subscribed to a certain data type it will get activated at the cadence that is specified with the frequency parameter. The app is still responsible for creating an HKObserverQuery to know which data types have been updated and the corresponding fetch queries. Note that certain data types (such as HKQuantityTypeIdentifierStepCount) have a minimum frequency of HKUpdateFrequencyHourly. This is enforced transparently to the caller.
public void executeQuery(HKQuery query)
Begins executing the given query.
After executing a query, the completion, update, and/or results handlers of that query will be invoked asynchronously on an arbitrary background queue as results become available. Errors that prevent a query from executing will be delivered to one of the query's handlers. Which handler the error will be delivered to is defined by the HKQuery subclass.
Each HKQuery instance may only be executed once and calling this method with a currently executing query or one that was previously executed will result in an exception.
If a query would retrieve objects with an HKObjectType property, then the application must request authorization to access objects of that type before executing the query.
public HKFitzpatrickSkinTypeObject fitzpatrickSkinTypeWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
Returns an object encapsulating the user's Fitzpatrick skin type.
Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierFitzpatrickSkinType.
public void handleAuthorizationForExtensionWithCompletion(HKHealthStore.Block_handleAuthorizationForExtensionWithCompletion completion)
Prompts the user to authorize the application for reading and saving objects.
When an app extension calls requestAuthorizationToShareTypes:readTypes:completion:, the parent application is responsible for calling this method to prompt the user to authorize the app and its extensions for the types that the extension requested access to.
The request is performed asynchronously and its completion will be executed on an arbitrary background queue after the user has responded. The success parameter of the completion indicates whether prompting the user, if necessary, completed successfully and was not cancelled by the user. It does NOT indicate whether the application was granted authorization.
public HKHealthStore init()
public void preferredUnitsForQuantityTypesCompletion(NSSet<? extends HKQuantityType> quantityTypes, HKHealthStore.Block_preferredUnitsForQuantityTypesCompletion completion)
Calls the completion with the preferred HKUnits for a given set of HKQuantityTypes.
A preferred unit is either the unit that the user has chosen in Health for displaying samples of the given quantity type or the default unit for that type in the current locale of the device. To access the user's preferences it is necessary to request read or share authorization for the set of HKQuantityTypes provided. If neither read nor share authorization has been granted to the app, then the default unit for the locale is provided.
An error will be returned when preferred units are inaccessible because protected health data is unavailable or authorization status is not determined for one or more of the provided types.
The returned dictionary will map HKQuantityType to HKUnit.
public void requestAuthorizationToShareTypesReadTypesCompletion(NSSet<? extends HKSampleType> typesToShare, NSSet<? extends HKObjectType> typesToRead, HKHealthStore.Block_requestAuthorizationToShareTypesReadTypesCompletion completion)
Prompts the user to authorize the application for reading and saving objects of the given types.
Before attempting to execute queries or save objects, the application should first request authorization from the user to read and share every type of object for which the application may require access.
The request is performed asynchronously and its completion will be executed on an arbitrary background queue after the user has responded. If the user has already chosen whether to grant the application access to all of the types provided, then the completion will be called without prompting the user. The success parameter of the completion indicates whether prompting the user, if necessary, completed successfully and was not cancelled by the user. It does NOT indicate whether the application was granted authorization.
To customize the messages displayed on the authorization sheet, set the following keys in your app's Info.plist file. Set the NSHealthShareUsageDescription key to customize the message for reading data. Set the NSHealthUpdateUsageDescription key to customize the message for writing data.
public void saveObjectWithCompletion(HKObject object, HKHealthStore.Block_saveObjectWithCompletion completion)
Saves an HKObject.
After an object is saved, on subsequent retrievals the sourceRevision property of the object will be set to the HKSourceRevision representing the version of the application that saved it.
If the object has an HKObjectType property, then in order to save an object successfully the application must first request authorization to share objects with that type. Saving an object with the same unique identifier as another object that has already been saved will fail. When the application attempts to save multiple objects, if any single object cannot be saved then none of the objects will be saved. The operation will fail if the objects array contains samples with endDates that are older than the date returned by earliestPermittedSampleDate.
This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.
public void saveObjectsWithCompletion(NSArray<? extends HKObject> objects, HKHealthStore.Block_saveObjectsWithCompletion completion)
Saves an array of HKObjects.
See discussion of saveObject:withCompletion:.
public void splitTotalEnergyStartDateEndDateResultsHandler(HKQuantity totalEnergy, NSDate startDate, NSDate endDate, HKHealthStore.Block_splitTotalEnergyStartDateEndDateResultsHandler resultsHandler)
For the time period specified, this method calculates the resting and active energy parts of the total energy provided.
This method uses the user's metrics like age, biological sex, body mass and height to determine their basal metabolic rate. If the application does not have authorization to access these characteristics or if the user has not entered their data then this method uses builtin default values.
public void startWatchAppWithWorkoutConfigurationCompletion(HKWorkoutConfiguration workoutConfiguration, HKHealthStore.Block_startWatchAppWithWorkoutConfigurationCompletion completion)
Launches or wakes up the WatchKit app on the watch
This method will launch the WatchKit app corresponding to the calling iOS application on the currently active Apple Watch. After launching, the handleWorkoutConfiguration: method on the WKExtensionDelegate protocol will be called with the HKWorkoutConfiguration as a parameter. The receiving Watch app can use this configuration object to create an HKWorkoutSession and start it with -startWorkoutSession:.
public void stopQuery(HKQuery query)
Stops a query that is executing from continuing to run.
Calling this method will prevent the handlers of the query from being invoked in the future. If the query is already stopped, this method does nothing.
public HKWheelchairUseObject wheelchairUseWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
Returns an object encapsulating the user's wheelchair use.
Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierWheelchairUse.
public void getRequestStatusForAuthorizationToShareTypesReadTypesCompletion(NSSet<? extends HKSampleType> typesToShare, NSSet<? extends HKObjectType> typesToRead, HKHealthStore.Block_getRequestStatusForAuthorizationToShareTypesReadTypesCompletion completion)
Determines whether requesting authorization for the given types is necessary.
Applications may call this method to determine whether the user would be prompted for authorization if the same collections of types are passed to requestAuthorizationToShareTypes:readTypes:completion:. This determination is performed asynchronously and its completion will be executed on an arbitrary background queue.
public boolean supportsHealthRecords()
Returns YES if the Health Records feature is available.
The Health Records feature is not available in all regions but may be present in unsupported regions if accounts have already been configured. This can change as accounts are modified during device restore or synchronization. Call supportsHealthRecords before attempting to request authorization for any clinical types.
public HKActivityMoveModeObject activityMoveModeWithError(org.moe.natj.general.ptr.Ptr<NSError> error)
Returns an object encapsulating the user's activity move mode
Before calling this method, the application should request authorization to access objects with the HKCharacteristicType identified by HKCharacteristicTypeIdentifierActivityMoveMode.
public void recalibrateEstimatesForSampleTypeAtDateCompletion(HKSampleType sampleType, NSDate date, HKHealthStore.Block_recalibrateEstimatesForSampleTypeAtDateCompletion completion)
Recalibrates the prediction algorithm used for this sample type.
Check -[HKSampleType allowsRecalibrationForEstimates] to see if a given sample type is supported. Calling this method results in first-party estimation algorithms to recalibrate what data is used when generating values for HKSamples of this sampleType.