> Documentation index: https://developer.android.com/reference/llms.txt

# BodyTemperatureRecord

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

*** ** * ** ***


```
public final class BodyTemperatureRecord implements Record
```

<br />

*** ** * ** ***

Captures the body temperature of a user. Each record represents a single instantaneous body temperature measurement.

## Summary

| ### Public constructors |
|---|
| `BodyTemperatureRecord( @NonNull Instant time, ZoneOffset zoneOffset, @NonNull Metadata metadata, @NonNull Temperature temperature, int measurementLocation )` |

| ### Public methods |
|---|---|
| `boolean` | `equals(Object other)` |
| `final int` | `getMeasurementLocation()` Where on the user's body the temperature measurement was taken from. |
| `@NonNull Metadata` | `getMetadata()` Set of common metadata associated with the written record. |
| `final @NonNull Temperature` | `getTemperature()` Temperature in `Temperature` unit. |
| `@NonNull Instant` | `getTime()` Time the record happened. |
| `ZoneOffset` | `getZoneOffset()` User experienced zone offset at `time`, or null if unknown. |
| `int` | `hashCode()` |
| `@NonNull String` | `toString()` |

## Public constructors

### BodyTemperatureRecord

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

```
public BodyTemperatureRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull Metadata metadata,
    @NonNull Temperature temperature,
    int measurementLocation
)
```

| Parameters |
|---|---|
| `@NonNull Instant time` | Time the record happened. |
| `ZoneOffset zoneOffset` | User experienced zone offset at `time`, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent. |
| `@NonNull Metadata metadata` | Set of common metadata associated with the written record. |
| `@NonNull Temperature temperature` | Temperature in `Temperature` unit. Required field. Valid range: 0-100 Celsius degrees. |
| `int measurementLocation` | Where on the user's body the temperature measurement was taken from. Optional field. Allowed values: `BodyTemperatureMeasurementLocation`. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getMeasurementLocation

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

```
public final int getMeasurementLocation()
```

Where on the user's body the temperature measurement was taken from. Optional field. Allowed values: `BodyTemperatureMeasurementLocation`.

| See also |
|---|---|
| `BodyTemperatureMeasurementLocation` |   |

### getMetadata

```
public @NonNull Metadata getMetadata()
```

Set of common metadata associated with the written record.

### getTemperature

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

```
public final @NonNull Temperature getTemperature()
```

Temperature in `Temperature` unit. Required field. Valid range: 0-100 Celsius degrees.

### getTime

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

```
public @NonNull Instant getTime()
```

Time the record happened.

### getZoneOffset

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

```
public ZoneOffset getZoneOffset()
```

User experienced zone offset at `time`, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```