# Vo2MaxRecord

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/records/Vo2MaxRecord.kt+class:androidx.health.connect.client.records.Vo2MaxRecord) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
public final class Vo2MaxRecord implements Record
```

<br />

*** ** * ** ***

Capture user's VO2 max score and optionally the measurement method.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#MEASUREMENT_METHOD_COOPER_TEST() = 3` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#MEASUREMENT_METHOD_HEART_RATE_RATIO() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#MEASUREMENT_METHOD_METABOLIC_CART() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#MEASUREMENT_METHOD_MULTISTAGE_FITNESS_TEST() = 4` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#MEASUREMENT_METHOD_OTHER() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#MEASUREMENT_METHOD_ROCKPORT_FITNESS_TEST() = 5` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#Vo2MaxRecord(java.time.Instant,java.time.ZoneOffset,androidx.health.connect.client.records.metadata.Metadata,kotlin.Double,kotlin.Int)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html time, https://developer.android.com/reference/java/time/ZoneOffset.html zoneOffset, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata metadata, double vo2MillilitersPerMinuteKilogram, int measurementMethod )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#getMeasurementMethod()()` VO2 max measurement method. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#getMetadata()()` Set of common metadata associated with the written record. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#getTime()()` Time the record happened. |
| `final double` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#getVo2MillilitersPerMinuteKilogram()()` Maximal aerobic capacity (VO2 max) in milliliters. |
| `https://developer.android.com/reference/java/time/ZoneOffset.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#getZoneOffset()()` User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/InstantaneousRecord#time()`, or null if unknown. |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord#toString()()` |

## Constants

### MEASUREMENT_METHOD_COOPER_TEST

```
public static final int MEASUREMENT_METHOD_COOPER_TEST = 3
```

### MEASUREMENT_METHOD_HEART_RATE_RATIO

```
public static final int MEASUREMENT_METHOD_HEART_RATE_RATIO = 2
```

### MEASUREMENT_METHOD_METABOLIC_CART

```
public static final int MEASUREMENT_METHOD_METABOLIC_CART = 1
```

### MEASUREMENT_METHOD_MULTISTAGE_FITNESS_TEST

```
public static final int MEASUREMENT_METHOD_MULTISTAGE_FITNESS_TEST = 4
```

### MEASUREMENT_METHOD_OTHER

```
public static final int MEASUREMENT_METHOD_OTHER = 0
```

### MEASUREMENT_METHOD_ROCKPORT_FITNESS_TEST

```
public static final int MEASUREMENT_METHOD_ROCKPORT_FITNESS_TEST = 5
```

## Public constructors

### Vo2MaxRecord

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

```
public Vo2MaxRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull Metadata metadata,
    double vo2MillilitersPerMinuteKilogram,
    int measurementMethod
)
```

## Public methods

### equals

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

### getMeasurementMethod

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

```
public final int getMeasurementMethod()
```

VO2 max measurement method. Optional field. Allowed values: `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord.MeasurementMethod`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/Vo2MaxRecord.MeasurementMethod` |   |

### getMetadata

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

Set of common metadata associated with the written record.

### getTime

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

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

Time the record happened.

### getVo2MillilitersPerMinuteKilogram

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

```
public final double getVo2MillilitersPerMinuteKilogram()
```

Maximal aerobic capacity (VO2 max) in milliliters. Required field. Valid range: 0-100.

### getZoneOffset

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

```
public ZoneOffset getZoneOffset()
```

User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/InstantaneousRecord#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()
```