-
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.
chore: initialize and available docs
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
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,19 @@ | ||
# `initializeHealth` Function | ||
|
||
The `initializeHealth` function sets up health integration for the application by requesting necessary permissions based on the platform (iOS or Android). | ||
|
||
It accepts a `permissions` object with keys `read` and `write`. Use the `HealthLinkPermissions` enum to add permissions to the arrays. | ||
|
||
Write method does not support `BloodPressure`, `RestingHeartRate` and `OxygenSaturation`, so I'd recommend not to ask for write permissions for those data types. | ||
|
||
--- | ||
|
||
## **Example Usage** | ||
|
||
```typescript | ||
const permissions = { | ||
read: [HealthLinkPermissions.StepCount, HealthLinkPermissions.HeartRate], | ||
write: [HealthLinkPermissions.StepCount], | ||
}; | ||
await initializeHealth(permissions); | ||
``` |
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,9 @@ | ||
# `isAvailable` Function | ||
|
||
## The `isAvailable` function returns a `true` if the SDK is available on the current platform, `false` otherwise. | ||
|
||
## **Example Usage** | ||
|
||
```typescript | ||
const available = await isAvailable(); | ||
``` |