MindfulnessSessionRecord


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

Captures a mindfulness session.

For example: yoga, meditation, guided breathing, etc.

Each record needs a start time, end time and a mindfulness session type. In addition, each record has an optional title and notes.

Summary

Nested classes

Builder class for MindfulnessSessionRecord

Constants
static Int

Guided breathing mindfulness session.

static Int

Meditation mindfulness session.

static Int

Stretches/movement mindfulness session.

static Int

Music/soundscapes mindfulness session.

static Int

Other mindfulness session.

static Int

Unguided mindfulness session.

static Int

Use this type if the mindfulness session type is unknown.

Public methods
Boolean
equals(other: Any?)

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

Int

Returns type of the mindfulness session.

CharSequence?

Returns notes for the mindfulness session.

CharSequence?

Returns title of the mindfulness session.

Int

Inherited functions
Properties
static AggregationType<Long!>

Metric identifier to retrieve total mindfulness session duration using aggregate APIs in android.health.connect.HealthConnectManager.

Constants

MINDFULNESS_SESSION_TYPE_BREATHING

static val MINDFULNESS_SESSION_TYPE_BREATHING: Int

Guided breathing mindfulness session.

Value: 3

MINDFULNESS_SESSION_TYPE_MEDITATION

static val MINDFULNESS_SESSION_TYPE_MEDITATION: Int

Meditation mindfulness session.

Value: 1

MINDFULNESS_SESSION_TYPE_MOVEMENT

static val MINDFULNESS_SESSION_TYPE_MOVEMENT: Int

Stretches/movement mindfulness session.

Value: 5

MINDFULNESS_SESSION_TYPE_MUSIC

static val MINDFULNESS_SESSION_TYPE_MUSIC: Int

Music/soundscapes mindfulness session.

Value: 4

MINDFULNESS_SESSION_TYPE_OTHER

static val MINDFULNESS_SESSION_TYPE_OTHER: Int

Other mindfulness session.

Value: 2

MINDFULNESS_SESSION_TYPE_UNGUIDED

static val MINDFULNESS_SESSION_TYPE_UNGUIDED: Int

Unguided mindfulness session.

Value: 6

MINDFULNESS_SESSION_TYPE_UNKNOWN

static val MINDFULNESS_SESSION_TYPE_UNKNOWN: Int

Use this type if the mindfulness session type is unknown.

Value: 0

Public methods

equals

Added in API level 36
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

getNotes

fun getNotes(): CharSequence?

Returns notes for the mindfulness session. Returns null if no notes was specified.

getTitle

fun getTitle(): CharSequence?

Returns title of the mindfulness session. Returns null if no title was specified.

hashCode

Added in API level 36
fun hashCode(): Int
Return
Int a hash code value for this object.

Properties

MINDFULNESS_DURATION_TOTAL

static val MINDFULNESS_DURATION_TOTAL: AggregationType<Long!>

Metric identifier to retrieve total mindfulness session duration using aggregate APIs in android.health.connect.HealthConnectManager. Calculated in milliseconds.