Skip to content

Commit

Permalink
chore: initialize and available docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carozo committed Jan 8, 2025
1 parent 47d2e61 commit d8a2ab6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/initializeHealth.md
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);
```
9 changes: 9 additions & 0 deletions docs/isAvailable.md
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();
```

0 comments on commit d8a2ab6

Please sign in to comment.