# BloodGlucose

Artifact: [androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect) [View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/units/BloodGlucose.kt+class:androidx.health.connect.client.units.BloodGlucose) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
class BloodGlucose : Comparable<BloodGlucose>
```

<br />

*** ** * ** ***

Represents a unit of blood glucose level (glycaemia). Supported units:

- mmol/L - see `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#millimolesPerLiter(kotlin.Double)`

- mg/dL - see `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#milligramsPerDeciliter(kotlin.Double)`

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#milligramsPerDeciliter(kotlin.Double)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)` Creates `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose` with the specified value in mg/dL. |
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#millimolesPerLiter(kotlin.Double)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)` Creates `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose` with the specified value in mmol/L. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#compareTo(androidx.health.connect.client.units.BloodGlucose)(other: https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose)` |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#inMilligramsPerDeciliter()` Returns the blood glucose level concentration in mg/dL. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose#inMillimolesPerLiter()` Returns the blood glucose level in mmol/L. |

## Public companion functions

### milligramsPerDeciliter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
fun milligramsPerDeciliter(value: Double): BloodGlucose
```

Creates `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose` with the specified value in mg/dL.

### millimolesPerLiter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
fun millimolesPerLiter(value: Double): BloodGlucose
```

Creates `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/BloodGlucose` with the specified value in mmol/L.

## Public functions

### compareTo

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
open operator fun compareTo(other: BloodGlucose): Int
```

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### inMilligramsPerDeciliter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
val inMilligramsPerDeciliter: Double
```

Returns the blood glucose level concentration in mg/dL.

### inMillimolesPerLiter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
val inMillimolesPerLiter: Double
```

Returns the blood glucose level in mmol/L.