---
name: "getHealthConnectStatus"
mode: "kit"
versionRequirements:
  - { name: "HealthKit", version: "5.18.0" }
  - { name: "@ray-js/ray", version: "1.6.17" }
platform:
  - "Android"
async: true
title: "health.getHealthConnectStatus - Get the Health Connect SDK status [Android only]"
---

## getHealthConnectStatus

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

> [PLATFORM] Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Get Health Connect SDK availability and authorization status [Android only]

### Parameters

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `complete` | `() => void` | No | - | Completion callback (executed on both success and failure) |
| `success` | `(params: number) => void` | No | - | Callback on successful API call |
| `fail` | `(params: Object) => void` ↓see below | No | - | Failure callback |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Error extension code |
| `errorMsg` | `string` | Error extension message |


### Examples

#### Basic call

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

const { getHealthConnectStatus } = health;

getHealthConnectStatus({
  success: (status) => {
    console.log('Health Connect status:', status);
  },
  fail: (error) => {
    console.log('getHealthConnectStatus fail', error.errorMsg);
  },
});
```
