Get the total steps per day over a specified date range.
Get the total steps per day over a specified date range.
...
@@ -375,32 +339,69 @@ The function will be called with an array of elements. Each element is an object
...
@@ -375,32 +339,69 @@ The function will be called with an array of elements. Each element is an object
___
___
#### ~~**`getMultiDayStepCounts`**~~
#### **`initStepCountObserver`**
**removed** - replaced by `getDailyStepCountSamples`
Setup an HKObserverQuery for step count (HKQuantityTypeIdentifierStepCount) that will
trigger an event listenable on react-native `NativeAppEventEmitter` when the
HealthKit step count has changed.
Get the total steps per day over a specified date range.
The `initStepCountObserver` method must be called before adding a listener to
NativeAppEventEmitter. After the step count observer has been initialized you can
listen to the NativeAppEventEmitter `change:steps` event and re-fetch relevent
step count data in the event handler.
The `initStepCountObserver` method should be called after HealthKit has been
successfully initialized (AppleHealthKit.initHealthKit has been called without
error).
`getMultiDayStepCounts` accepts an options object containing required *`startDate: ISO8601Timestamp`* and optional *`endDate: ISO8601Timestamp`*. if `endDate` is not provided it will default to the current time