MenstrualCyclePhaseRecord


class MenstrualCyclePhaseRecord : IntervalRecord
kotlin.Any
   ↳ android.health.connect.datatypes.Record
   ↳ android.health.connect.datatypes.IntervalRecord
   ↳ android.health.connect.datatypes.MenstrualCyclePhaseRecord

Represents a user's menstrual cycle phase for a specific day.

This record is designed to capture the current phase of the menstrual cycle (e.g., follicular, luteal) for a given day. It is not intended for predictive use cases.

Summary

Nested classes

Builder class for MenstrualCyclePhaseRecord.

Constants
static Int

Represents the follicular phase of the menstrual cycle.

static Int

Represents the luteal phase of the menstrual cycle.

Public methods
Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

LocalDate

Returns the date of the record.

Int

Returns the day within the menstrual cycle.

Int

Returns the phase of the menstrual cycle.

Int

Returns a hash code value for the object.

Boolean

Returns whether the day of cycle was set in this record.

Inherited functions

Constants

PHASE_FOLLICULAR

static val PHASE_FOLLICULAR: Int

Represents the follicular phase of the menstrual cycle. This phase begins with menstruation and ends with ovulation.

Value: 1

PHASE_LUTEAL

static val PHASE_LUTEAL: Int

Represents the luteal phase of the menstrual cycle. This phase begins after ovulation and ends just before the next menstrual period.

Value: 2

Public methods

equals

Added in API level 37
fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Parameters
obj the reference object with which to compare.
object the reference object with which to compare.
This value may be null.
o This value may be null.
Return
Boolean true if this object is the same as the obj

getDate

fun getDate(): LocalDate

Returns the date of the record.

Return
LocalDate This value cannot be null.

getDayOfCycle

fun getDayOfCycle(): Int

Returns the day within the menstrual cycle.

Exceptions
java.lang.IllegalStateException if the day of cycle was not set.

getPhase

fun getPhase(): Int

Returns the phase of the menstrual cycle.

Return
Int Value is one of the following:

hashCode

Added in API level 37
fun hashCode(): Int

Returns a hash code value for the object.

Return
Int a hash code value for this object.

isDayOfCycleSet

fun isDayOfCycleSet(): Boolean

Returns whether the day of cycle was set in this record.