getHealthConnectStatus(params: Object)

Requires:
HealthKit≥5.18.0@ray-js/ray≥1.6.17
Platforms:
Android
import { health } from '@ray-js/ray';

const { getHealthConnectStatus } = health;

// Promise usage
try {
  const res = await getHealthConnectStatus();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

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

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
NoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

Query Health Connect status

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

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