forked from agencyenterprise/react-native-health
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e523865
commit 46c9beb
Showing
60 changed files
with
502 additions
and
200 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Documentation | ||
|
||
### Constants | ||
* [Activities](activities.md) | ||
* [Observers](observers.md) | ||
* [Permissions](permissions.md) | ||
* [Units](units.md) | ||
|
||
### Base Methods | ||
* [isAvailable](isAvailable.md) | ||
* [initHealthKit](initHealthKit.md) | ||
* [authorizationStatusForType](authorizationStatusForType.md) | ||
|
||
### Background Methods | ||
* [initStepCountObserver](initStepCountObserver.md) | ||
* [setObserver](setObserver.md) | ||
|
||
### Activity Methods | ||
* [getActiveEnergyBurned](getActiveEnergyBurned.md) | ||
* [getBasalEnergyBurned](getBasalEnergyBurned.md) | ||
|
||
### Body Methods | ||
* [getLatestHeight](getLatestHeight.md) | ||
* [getLatestWeight](getLatestWeight.md) | ||
* [getHeightSamples](getHeightSamples.md) | ||
* [getWeightSamples](getWeightSamples.md) | ||
* [getBodyTemperatureSamples](getBodyTemperatureSamples.md) | ||
* [getLatestBodyFatPercentage](getLatestBodyFatPercentage.md) | ||
* [getBodyFatPercentageSamples](getBodyFatPercentageSamples.md) | ||
* [getLatestLeanBodyMass](getLatestLeanBodyMass.md) | ||
* [getLeanBodyMassSamples](getLeanBodyMassSamples.md) | ||
* [saveHeight](saveHeight.md) | ||
* [saveWeight](saveWeight.md) | ||
* [saveBodyFatPercentage](saveBodyFatPercentage.md) | ||
* [saveLeanBodyMass](saveLeanBodyMass.md) | ||
|
||
### Characteristic Methods | ||
* [getBiologicalSex](getBiologicalSex.md) | ||
* [getDateOfBirth](getDateOfBirth.md) | ||
|
||
### Dietary Methods | ||
* [saveFood](saveFood.md) | ||
* [saveWater](saveWater.md) | ||
|
||
### Fitness Methods | ||
* [getDailyStepCountSamples](getDailyStepCountSamples.md) | ||
* [getStepCount](getStepCount.md) | ||
* [getSamples](docs/getSamples.md) | ||
* [getDailyDistanceWalkingRunningSamples](getDailyDistanceWalkingRunningSamples.md) | ||
* [getDistanceWalkingRunning](getDistanceWalkingRunning.md) | ||
* [getDistanceSwimming](getDistanceSwimming.md) | ||
* [getDailyDistanceCyclingSamples](getDailyDistanceCyclingSamples.md) | ||
* [getDistanceCycling](getDistanceCycling.md) | ||
* [getDailyFlightsClimbedSamples](getDailyFlightsClimbedSamples.md) | ||
* [getFlightsClimbed](getFlightsClimbed.md) | ||
* [saveSteps](saveSteps.md) | ||
|
||
### Lab Tests Methods | ||
* [getBloodAlcoholContentSamples](getBloodAlcoholContentSamples.md) | ||
* [getBloodGlucoseSamples](getBloodglucoseSamples.md) | ||
* [getLatestBloodAlcoholContent](getLatestBloodAlcoholContent.md) | ||
* [saveBloodAlcoholContent](saveBloodAlcoholContent.md) | ||
* [saveBloodGlucoseSample](saveBloodGlucoseSample.md) | ||
|
||
### Mindfulness Methods | ||
* [getMindfulSession](docs/getMindfulSession.md) | ||
* [saveMindfulSession](saveMindfulSession.md) | ||
|
||
### Sleep Methods | ||
* [getSleepSamples](getSleepSamples.md) | ||
|
||
#### Vitals Methods | ||
* [getBloodPressureSamples](getBloodPressureSamples.md) | ||
* [getHeartRateSamples](getHeartRateSamples.md) | ||
* [getHeartRateVariabilitySamples](getHeartRateVariabilitySamples.md) | ||
* [getRestingHeartRateSamples](getRestingHeartRateSamples.md) | ||
* [getVo2MaxSamples](getVo2MaxSamples.md) | ||
* [getLatestBmi](getLatestBmi.md) | ||
* [getRespiratoryRateSamples](getRespiratoryRateSamples.md) | ||
* [saveBmi](saveBmi.md) | ||
|
||
#### Workout Methods | ||
* [getWorkout](getWorkout.md) | ||
* [saveWorkout](saveWorkout.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Activities | ||
|
||
The following activities are supported by the library | ||
|
||
``` | ||
AmericanFootball | ||
Archery | ||
AustralianFootball | ||
Badminton | ||
Baseball | ||
Basketball | ||
Bowling | ||
Boxing | ||
Climbing | ||
Cricket | ||
CrossTraining | ||
Curling | ||
Cycling | ||
Dance | ||
Elliptical | ||
EquestrianSports | ||
Fencing | ||
Fishing | ||
FunctionalStrengthTraining | ||
Golf | ||
Gymnastics | ||
Handball | ||
Hiking | ||
Hockey | ||
Hunting | ||
Lacrosse | ||
MartialArts | ||
MindAndBody | ||
PaddleSports | ||
Play | ||
PreparationAndRecovery | ||
Racquetball | ||
Rowing | ||
Rugby | ||
Running | ||
Sailing | ||
SkatingSports | ||
SnowSports | ||
Soccer | ||
Softball | ||
Squash | ||
StairClimbing | ||
SurfingSports | ||
Swimming | ||
TableTennis | ||
Tennis | ||
TrackAndField | ||
TraditionalStrengthTraining | ||
Volleyball | ||
Walking | ||
WaterFitness | ||
WaterPolo | ||
WaterSports | ||
Wrestling | ||
Yoga | ||
Barre | ||
CoreTraining | ||
CrossCountrySkiing | ||
DownhillSkiing | ||
Flexibility | ||
HighIntensityIntervalTraining | ||
JumpRope | ||
Kickboxing | ||
Pilates | ||
Snowboarding | ||
Stairs | ||
StepTraining | ||
WheelchairWalkPace | ||
WheelchairRunPace | ||
TaiChi | ||
MixedCardio | ||
HandCycling | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Get Workout | ||
|
||
> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Observers | ||
|
||
The following observer types are supported by the library | ||
|
||
``` | ||
Cycling | ||
HeartRate | ||
RestingHeartRate | ||
Running | ||
StairClimbing | ||
Walking | ||
Workout | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# Permissions | ||
|
||
These permissions are exported as constants of the `react-native-health` module. | ||
|
||
```typescript | ||
import AppleHealthKit, { HealthValue, HealthKitPermissions } from 'react-native-health'; | ||
|
||
/* Permission options */ | ||
const permissions = { | ||
permissions: { | ||
read: [ | ||
AppleHealthKit.Constants.Permissions.HeartRate, | ||
], | ||
write: [ | ||
AppleHealthKit.Constants.Permissions.Steps, | ||
], | ||
} | ||
} as HealthKitPermissions | ||
|
||
|
||
AppleHealthKit.initHealthKit(permissions, (error: string) => { | ||
/* Called after we receive a response from the system */ | ||
``` | ||
## Available Permissions | ||
``` | ||
ActiveEnergyBurned | ||
AppleExerciseTime | ||
BasalEnergyBurned | ||
BiologicalSex | ||
BloodAlcoholContent | ||
BloodGlucose | ||
BloodPressureDiastolic | ||
BloodPressureSystolic | ||
BodyFatPercentage | ||
BodyMass | ||
BodyMassIndex | ||
BodyTemperature | ||
DateOfBirth | ||
Biotin | ||
Caffeine | ||
Calcium | ||
Carbohydrates | ||
Chloride | ||
Cholesterol | ||
Copper | ||
EnergyConsumed | ||
FatMonounsaturated | ||
FatPolyunsaturated | ||
FatSaturated | ||
FatTotal | ||
Fiber | ||
Folate | ||
Iodine | ||
Iron | ||
Magnesium | ||
Manganese | ||
Molybdenum | ||
Niacin | ||
PantothenicAcid | ||
Phosphorus | ||
Potassium | ||
Protein | ||
Riboflavin | ||
Selenium | ||
Sodium | ||
Sugar | ||
Thiamin | ||
VitaminA | ||
VitaminB12 | ||
VitaminB6 | ||
VitaminC | ||
VitaminD | ||
VitaminE | ||
VitaminK | ||
Zinc | ||
Water | ||
DistanceCycling | ||
DistanceWalkingRunning | ||
FlightsClimbed | ||
HeartRate | ||
RestingHeartRate | ||
HeartRateVariability | ||
Height | ||
LeanBodyMass | ||
MindfulSession | ||
NikeFuel | ||
RespiratoryRate | ||
SleepAnalysis | ||
StepCount | ||
Steps | ||
Vo2Max | ||
Weight | ||
Workout | ||
``` | ||
## Supported Apple Permissions | ||
The available Healthkit identifiers are supported | ||
| Permission | Healthkit Identifier Type | Read | Write | | ||
|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|-------| | ||
| ActiveEnergyBurned | [HKQuantityTypeIdentifierActiveEnergyBurned](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/1615771-activeenergyburned?language=objc) | ✓ | | | ||
| BasalEnergyBurned | [HKQuantityTypeIdentifierBasalEnergyBurned](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/1615512-basalenergyburned?language=objc) | ✓ | | | ||
| BiologicalSex | [HKCharacteristicTypeIdentifierBiologicalSex](https://developer.apple.com/reference/Healthkit/hkcharacteristictypeidentifierbiologicalsex?language=objc) | ✓ | | | ||
| BloodAlcoholContent | [HKQuantityTypeIdentifierBloodAlcoholContent](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbloodalcoholcontent?language=objc) | ✓ | ✓ | | ||
| BloodGlucose | [HKQuantityTypeIdentifierBloodGlucose](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbloodglucose?language=objc) | ✓ | | | ||
| BloodPressureDiastolic | [HKQuantityTypeIdentifierBloodPressureDiastolic](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic?language=objc) | ✓ | ✓ | | ||
| BloodPressureSystolic | [HKQuantityTypeIdentifierBloodPressureSystolic](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic?language=objc) | ✓ | ✓ | | ||
| BodyMassIndex | [HKQuantityTypeIdentifierBodyMassIndex](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodymassindex?language=objc) | ✓ | ✓ | | ||
| BodyTemperature | [HKQuantityTypeIdentifierBodyTemperature](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodytemperature?language=objc) | ✓ | | | ||
| DateOfBirth | [HKCharacteristicTypeIdentifierDateOfBirth](https://developer.apple.com/reference/Healthkit/hkcharacteristictypeidentifierdateofbirth?language=objc) | ✓ | | | ||
| DistanceCycling | [HKQuantityTypeIdentifierDistanceCycling](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierdistancecycling?language=objc) | ✓ | ✓ | | ||
| DistanceWalkingRunning | [HKQuantityTypeIdentifierDistanceWalkingRunning](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierdistancewalkingrunning?language=objc) | ✓ | ✓ | | ||
| FlightsClimbed | [HKQuantityTypeIdentifierFlightsClimbed](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierflightsclimbed?language=objc) | ✓ | ✓ | | ||
| HeartRate | [HKQuantityTypeIdentifierHeartRate](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierheartrate?language=objc) | ✓ | | | ||
| Height | [HKQuantityTypeIdentifierHeight](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierheight?language=objc) | ✓ | ✓ | | ||
| LeanBodyMass | [HKQuantityTypeIdentifierLeanBodyMass](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierleanbodymass?language=objc) | ✓ | ✓ | | ||
| MindfulSession | [HKCategoryTypeIdentifierMindfulSession](https://developer.apple.com/reference/healthkit/hkcategorytypeidentifiermindfulsession?language=objc) | | ✓ | | ||
| RespiratoryRate | [HKQuantityTypeIdentifierRespiratoryRate](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierrespiratoryrate?language=objc) | ✓ | | | ||
| SleepAnalysis | [HKCategoryTypeIdentifierSleepAnalysis](https://developer.apple.com/reference/Healthkit/hkcategorytypeidentifiersleepanalysis?language=objc) | ✓ | | | ||
| StepCount | [HKQuantityTypeIdentifierStepCount](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierstepcount?language=objc) | ✓ | ✓ | | ||
| Steps | [HKQuantityTypeIdentifierSteps](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifiersteps?language=objc) | ✓ | ✓ | | ||
| Weight | [HKQuantityTypeIdentifierBodyMass](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodymass?language=objc) | ✓ | ✓ | | ||
| BodyFatPercentage | [HKQuantityTypeIdentifierBodyFatPercentage](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodyfatpercentage?language=objc) | ✓ | ✓ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Save BloodAlcoholContent | ||
|
||
> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Save BloodGlucoseContent | ||
|
||
> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Save Food | ||
|
||
> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Save Water | ||
|
||
> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Save Workout | ||
|
||
> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Units | ||
|
||
The following units are supported by the library | ||
|
||
``` | ||
bpm | ||
calorie | ||
celsius | ||
count | ||
day | ||
fahrenheit | ||
foot | ||
gram | ||
hour | ||
inch | ||
joule | ||
meter | ||
mgPerdL | ||
mile | ||
minute | ||
mmhg | ||
mmolPerL | ||
percent | ||
pound | ||
second | ||
mlPerKgMin | ||
``` |