# MilestoneMarkerSummary

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/data/MilestoneMarkerSummary.kt+class:androidx.health.services.client.data.MilestoneMarkerSummary) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/health/services/client/data/MilestoneMarkerSummary "View this page in Java")


```
class MilestoneMarkerSummary
```

<br />

*** ** * ** ***

The summary of metrics and state from the previously achieved milestone marker `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseGoal`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#MilestoneMarkerSummary(java.time.Instant,java.time.Instant,java.time.Duration,androidx.health.services.client.data.ExerciseGoal,androidx.health.services.client.data.DataPointContainer)( startTime: https://developer.android.com/reference/java/time/Instant.html, endTime: https://developer.android.com/reference/java/time/Instant.html, activeDuration: https://developer.android.com/reference/java/time/Duration.html, achievedGoal: https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseGoal<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-number/index.html>, summaryMetrics: https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPointContainer )` |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseGoal<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-number/index.html>` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#achievedGoal()` The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseGoal` that triggered this milestone summary. |
| `https://developer.android.com/reference/java/time/Duration.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#activeDuration()` Returns the total elapsed time for which the exercise was active during this milestone, i.e. started but not paused. |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#endTime()` Returns the time at which this milestone marker was reached. |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#startTime()` Returns the time at which this milestone marker started being tracked. |
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPointContainer` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#summaryMetrics()` Returns the `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPointContainer` for aggregated metrics tracked between `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#(java.time.Instant,java.time.Instant,java.time.Duration,androidx.health.services.client.data.ExerciseGoal,androidx.health.services.client.data.DataPointContainer)` and `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#(java.time.Instant,java.time.Instant,java.time.Duration,androidx.health.services.client.data.ExerciseGoal,androidx.health.services.client.data.DataPointContainer)` i.e. during the duration of this milestone. |

## Public constructors

### MilestoneMarkerSummary

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

```
MilestoneMarkerSummary(
    startTime: Instant,
    endTime: Instant,
    activeDuration: Duration,
    achievedGoal: ExerciseGoal<Number>,
    summaryMetrics: DataPointContainer
)
```

## Public functions

### toString

```
open fun toString(): String
```

## Public properties

### achievedGoal

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

```
val achievedGoal: ExerciseGoal<Number>
```

The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseGoal` that triggered this milestone summary.

### activeDuration

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

```
val activeDuration: Duration
```

Returns the total elapsed time for which the exercise was active during this milestone, i.e. started but not paused.

### endTime

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

```
val endTime: Instant
```

Returns the time at which this milestone marker was reached.

### startTime

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

```
val startTime: Instant
```

Returns the time at which this milestone marker started being tracked.

### summaryMetrics

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

```
val summaryMetrics: DataPointContainer
```

Returns the `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPointContainer` for aggregated metrics tracked between `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#(java.time.Instant,java.time.Instant,java.time.Duration,androidx.health.services.client.data.ExerciseGoal,androidx.health.services.client.data.DataPointContainer)` and `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/MilestoneMarkerSummary#(java.time.Instant,java.time.Instant,java.time.Duration,androidx.health.services.client.data.ExerciseGoal,androidx.health.services.client.data.DataPointContainer)` i.e. during the duration of this milestone. This summary will only contain `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint`s for `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/AggregateDataType`s.