# OvulationTestRecord

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

*** ** * ** ***


```
public final class OvulationTestRecord implements Record
```

<br />

*** ** * ** ***

Each record represents the result of an ovulation test.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#RESULT_HIGH() = 2` High fertility. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#RESULT_INCONCLUSIVE() = 0` Inconclusive result. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#RESULT_NEGATIVE() = 3` Negative fertility (may also be referred as "low" fertility). |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#RESULT_POSITIVE() = 1` Positive fertility (may also be referred as "peak" fertility). |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#OvulationTestRecord(java.time.Instant,java.time.ZoneOffset,kotlin.Int,androidx.health.connect.client.records.metadata.Metadata)( @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, int result, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata metadata )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `@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/OvulationTestRecord#getMetadata()()` Set of common metadata associated with the written record. |
| `final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#getResult()()` The result of a user's ovulation test, which shows if they're ovulating or not. |
| `@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/OvulationTestRecord#getTime()()` Time the record happened. |
| `https://developer.android.com/reference/java/time/ZoneOffset.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#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/OvulationTestRecord#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/OvulationTestRecord#toString()()` |

## Constants

### RESULT_HIGH

```
public static final int RESULT_HIGH = 2
```

High fertility. Refers to a rise in estrogen or luteinizing hormone that may signal the fertile window (time in the menstrual cycle when conception is likely to occur).

### RESULT_INCONCLUSIVE

```
public static final int RESULT_INCONCLUSIVE = 0
```

Inconclusive result. Refers to ovulation test results that are indeterminate (e.g. may be testing malfunction, user error, etc.). ". Any unknown value will also be returned as `https://developer.android.com/reference/androidx/health/connect/client/records/OvulationTestRecord#RESULT_INCONCLUSIVE()`.

### RESULT_NEGATIVE

```
public static final int RESULT_NEGATIVE = 3
```

Negative fertility (may also be referred as "low" fertility). Refers to the time in the cycle where fertility/conception is expected to be low.

### RESULT_POSITIVE

```
public static final int RESULT_POSITIVE = 1
```

Positive fertility (may also be referred as "peak" fertility). Refers to the peak of the luteinizing hormone (LH) surge and ovulation is expected to occur in 10-36 hours.

## Public constructors

### OvulationTestRecord

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

```
public OvulationTestRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    int result,
    @NonNull Metadata metadata
)
```

## Public methods

### equals

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

### getMetadata

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

Set of common metadata associated with the written record.

### getResult

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

```
public final int getResult()
```

The result of a user's ovulation test, which shows if they're ovulating or not. Required field.

### 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.

### 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()
```