---
name: "getHealthConnectStatusSync"
mode: "kit"
versionRequirements:
  - { name: "HealthKit", version: "5.18.0" }
  - { name: "@ray-js/ray", version: "1.6.17" }
platform:
  - "Android"
title: "health.getHealthConnectStatusSync - health connect sdk 状态获取[Android only]的同步版本"
---

## getHealthConnectStatusSync

> [VERSION] HealthKit >= 5.18.0 | @ray-js/ray >= 1.6.17

> [PLATFORM] Android

### 描述

获取 Health Connect SDK 可用与授权状态 [Android only]

### 参数

无


### 示例代码

#### 查询 Health Connect 状态

```tsx
import { health } from '@ray-js/ray'

health.getHealthConnectStatus({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});
```
