Module: HealthKit

Members

(static) EventName :string

HealthKit record processed event name.
Type:
  • string
Properties:
Name Type Description
ON_HEALTHKIT_RECORD_PROCESSED string
Source:

(static) HistoricalSet :string

Identifiers for available historical fetch sets.
Type:
  • string
Properties:
Name Type Description
ROUTINE string
FITNESS string
Source:

(static) SampleType :string

String constants representing HealthKit sample types.
Type:
  • string
Properties:
Name Type Description
HKQuantityTypeIdentifierBodyMassIndex string
HKQuantityTypeIdentifierBodyFatPercentage string
HKQuantityTypeIdentifierHeight string
HKQuantityTypeIdentifierBodyMass string
HKQuantityTypeIdentifierLeanBodyMass string
HKQuantityTypeIdentifierStepCount string
HKQuantityTypeIdentifierDistanceWalkingRunning string
HKQuantityTypeIdentifierDistanceCycling string
HKQuantityTypeIdentifierBasalEnergyBurned string
HKQuantityTypeIdentifierActiveEnergyBurned string
HKQuantityTypeIdentifierFlightsClimbed string
HKQuantityTypeIdentifierNikeFuel string
HKQuantityTypeIdentifierAppleExerciseTime string
HKQuantityTypeIdentifierHeartRate string
HKQuantityTypeIdentifierBodyTemperature string
HKQuantityTypeIdentifierBasalBodyTemperature string
HKQuantityTypeIdentifierBloodPressureSystolic string
HKQuantityTypeIdentifierBloodPressureDiastolic string
HKQuantityTypeIdentifierRespiratoryRate string
HKQuantityTypeIdentifierOxygenSaturation string
HKQuantityTypeIdentifierPeripheralPerfusionIndex string
HKQuantityTypeIdentifierBloodGlucose string
HKQuantityTypeIdentifierNumberOfTimesFallen string
HKQuantityTypeIdentifierElectrodermalActivity string
HKQuantityTypeIdentifierInhalerUsage string
HKQuantityTypeIdentifierBloodAlcoholContent string
HKQuantityTypeIdentifierForcedVitalCapacity string
HKQuantityTypeIdentifierForcedExpiratoryVolume1 string
HKQuantityTypeIdentifierPeakExpiratoryFlowRate string
HKQuantityTypeIdentifierDietaryFatTotal string
HKQuantityTypeIdentifierDietaryFatPolyunsaturated string
HKQuantityTypeIdentifierDietaryFatMonounsaturated string
HKQuantityTypeIdentifierDietaryFatSaturated string
HKQuantityTypeIdentifierDietaryCholesterol string
HKQuantityTypeIdentifierDietarySodium string
HKQuantityTypeIdentifierDietaryCarbohydrates string
HKQuantityTypeIdentifierDietaryFiber string
HKQuantityTypeIdentifierDietarySugar string
HKQuantityTypeIdentifierDietaryEnergyConsumed string
HKQuantityTypeIdentifierDietaryProtein string
HKQuantityTypeIdentifierDietaryVitaminA string
HKQuantityTypeIdentifierDietaryVitaminB6 string
HKQuantityTypeIdentifierDietaryVitaminB12 string
HKQuantityTypeIdentifierDietaryVitaminC string
HKQuantityTypeIdentifierDietaryVitaminD string
HKQuantityTypeIdentifierDietaryVitaminE string
HKQuantityTypeIdentifierDietaryVitaminK string
HKQuantityTypeIdentifierDietaryCalcium string
HKQuantityTypeIdentifierDietaryIron string
HKQuantityTypeIdentifierDietaryThiamin string
HKQuantityTypeIdentifierDietaryRiboflavin string
HKQuantityTypeIdentifierDietaryNiacin string
HKQuantityTypeIdentifierDietaryFolate string
HKQuantityTypeIdentifierDietaryBiotin string
HKQuantityTypeIdentifierDietaryPantothenicAcid string
HKQuantityTypeIdentifierDietaryPhosphorus string
HKQuantityTypeIdentifierDietaryIodine string
HKQuantityTypeIdentifierDietaryMagnesium string
HKQuantityTypeIdentifierDietaryZinc string
HKQuantityTypeIdentifierDietarySelenium string
HKQuantityTypeIdentifierDietaryCopper string
HKQuantityTypeIdentifierDietaryManganese string
HKQuantityTypeIdentifierDietaryChromium string
HKQuantityTypeIdentifierDietaryMolybdenum string
HKQuantityTypeIdentifierDietaryChloride string
HKQuantityTypeIdentifierDietaryPotassium string
HKQuantityTypeIdentifierDietaryCaffeine string
HKQuantityTypeIdentifierDietaryWater string
HKQuantityTypeIdentifierUVExposure string
HKCategoryTypeIdentifierSleepAnalysis string
HKCategoryTypeIdentifierAppleStandHour string
HKCategoryTypeIdentifierCervicalMucusQuality string
HKCategoryTypeIdentifierOvulationTestResult string
HKCategoryTypeIdentifierMenstrualFlow string
HKCategoryTypeIdentifierIntermenstrualBleeding string
HKCategoryTypeIdentifierSexualActivity string
HKQuantityTypeIdentifierPushCount string
HKQuantityTypeIdentifierDistanceWheelchair string
HKCategoryTypeIdentifierMindfulSession string
HKQuantityTypeIdentifierSwimmingStrokeCount string
HKQuantityTypeIdentifierDistanceSwimming string
HKCorrelationTypeIdentifierBloodPressure string
HKCorrelationTypeIdentifierFood string
HKWorkoutTypeIdentifier string
Source:

(static) SubscriptionSet :number

Identifiers for available subscription sets.
Type:
  • number
Properties:
Name Type Description
ROUTINE number
DIABETES number
WEIGHT number
FITNESS number
SLEEP number
BASIC_NUTRITION number
REPRODUCTIVE_HEALTH number
BIOMETRICS number
Source:

Methods

(static) fetchHistoricalSets(historyOptions, success, error)

Fetch historical data for the specified sets across the specified dates.
Parameters:
Name Type Description
historyOptions HistoryOptions | Array.<HistoricalSet> HistoricalSet and Date query options
success HKHistoricalFetchCallback Response containing count of records for each record type keyed by record type values from ValidicMobile.RecordType.
error FailCallback Error response if invalid historical sets are provided.
Source:

(static) fetchLatestData()

Initiate new queries against HealthKit.
Source:

(static) getSampleTypesForRecordType(recordType, success, error)

Returns sample types associated with a record type.
Parameters:
Name Type Description
recordType RecordType Number representing one of the available record types from RecordType.
success HKSampleTypesCallback Response containing array of sample types for given record type.
error FailCallback Error response is invalid subscription set provided.
Deprecated:
  • getSampleTypesForRecordType is deprecated, please use getSampleTypesForSubscriptionSet instead.
Source:

(static) getSampleTypesForSubscriptionSet(subscriptionSetID, success, error)

Returns sample types associated with a subscription set. See ValidicMobile library documentation for description of sets.
Parameters:
Name Type Description
subscriptionSetID SubscriptionSet String representing one of the available subscription sets from SubscriptionSet.
success HKSampleTypesCallback Response containing array of sample types for given subscription set.
error FailCallback Error response if invalid subscription set provided.
Source:

(static) getSubscriptions(success)

Parameters:
Name Type Description
success HKSampleTypesCallback Response containing array of currently subscribed sample types.
Source:

(static) isHealthKitAvailable(callback)

Indicates the availability of HealthKit
Parameters:
Name Type Description
callback AvailableCallback Callback function including whether healthkit is available for the platform the application is running on. For Android and iPad this callback will always contain {isAvailable: false}
Source:

(static) setHealthKitListener(success)

Registers listener for HealthKit records processed event. It is recommended to use event listeners instead.
Parameters:
Name Type Description
success HKCallback Function invoked when HealthKit records have been processed and submitted.
Source:

(static) setSubscriptions(params, success, error)

Parameters:
Name Type Description
params Array.<string> Array of Strings which map to sample types. See HealthKit.SampleType
success HKSetSubscriptionsCallback Subscriptions were set successfully
error FailCallback Invalid parameters were given
Source:

Type Definitions

HistoryOptions

Source: