Added in API level 34

HealthConnectException


open class HealthConnectException : RuntimeException
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.lang.RuntimeException
   ↳ android.health.connect.HealthConnectException

Class representing health connect exceptions.

Summary

Constants
static Int

Data sync is in progress.

static Int

An internal error occurred which the caller cannot address.

static Int

The caller supplied invalid arguments to the call.

static Int

An issue occurred reading or writing to storage.

static Int

The caller exhausted the allotted rate limit.

static Int

An IPC related error occurred.

static Int

The caller doesn't have the correct permissions for this call.

static Int

An unknown error occurred while processing the call.

static Int

This operation is currently not supported by the platform.

Public methods
open Int

Constants

ERROR_DATA_SYNC_IN_PROGRESS

Added in API level 34
static val ERROR_DATA_SYNC_IN_PROGRESS: Int

Data sync is in progress. Data read and writes are blocked.

Caller should try this api call again later.

Value: 8

ERROR_INTERNAL

Added in API level 34
static val ERROR_INTERNAL: Int

An internal error occurred which the caller cannot address.

This error may be considered similar to IllegalStateException

Value: 2

ERROR_INVALID_ARGUMENT

Added in API level 34
static val ERROR_INVALID_ARGUMENT: Int

The caller supplied invalid arguments to the call.

This error may be considered similar to IllegalArgumentException.

Value: 3

ERROR_IO

Added in API level 34
static val ERROR_IO: Int

An issue occurred reading or writing to storage. The call might succeed if repeated.

This error may be considered similar to java.io.IOException.

Value: 4

ERROR_RATE_LIMIT_EXCEEDED

Added in API level 34
static val ERROR_RATE_LIMIT_EXCEEDED: Int

The caller exhausted the allotted rate limit.

Value: 7

ERROR_REMOTE

Added in API level 34
static val ERROR_REMOTE: Int

An IPC related error occurred.

This error may be considered similar to android.os.RemoteException.

Value: 6

ERROR_SECURITY

Added in API level 34
static val ERROR_SECURITY: Int

The caller doesn't have the correct permissions for this call.

This error may be considered similar to java.lang.SecurityException.

Value: 5

ERROR_UNKNOWN

Added in API level 34
static val ERROR_UNKNOWN: Int

An unknown error occurred while processing the call.

Value: 1

ERROR_UNSUPPORTED_OPERATION

Added in API level 34
static val ERROR_UNSUPPORTED_OPERATION: Int

This operation is currently not supported by the platform.

Caller may try this api call again later.

Value: 9

Public methods

getErrorCode

Added in API level 34
open fun getErrorCode(): Int