LiveUpdateState

Immutable snapshot of a Live Update, parsed from a single push payload.

This is the input handed to createStyle on every start / update render, and the value type an integrator reads to drive a custom progress style. It carries the identity and lifecycle of the update (getActivityId, getOperation), its textual content (getTitle, getSubtitle), progress data (getProgress, isProgressIndeterminate, getSegments), the large-icon URL, notification actions, the header-time configuration (see the mode tree below), and an arbitrary JSON extras object that is the primary channel for custom business data.

Instances are immutable and built via Builder; all reference getters are non-null except where annotated @Nullable.

Header-time mode tree — how the four time fields interact. The platform silently ignores meaningless combinations; this is the integrator's contract, not enforced here:

showWhen=false ──────────────► time hidden, the other three are irrelevant
showWhen=true (default)
  └─ when = anchor (epoch ms)
       ├─ chronometer=false (default) ──► static stamp ("14:42" / "5 min ago")
       └─ chronometer=true ──► live counter from `when`
            ├─ chronometerCountDown=false (default) ──► counts up ("12:34" rising)
            └─ chronometerCountDown=true ───────────► counts down ("5:00" falling)

Types

Link copied to clipboard
class Builder
Fluent builder for LiveUpdateState.

Properties

Link copied to clipboard
val actions: List<Action>
Link copied to clipboard
Link copied to clipboard
val extras: JSONObject
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val when: Long

Functions

Link copied to clipboard
Whether the header time ticks as a live chronometer.
Link copied to clipboard
Whether a ticking chronometer counts down rather than up.
Link copied to clipboard
Whether the progress bar animates indeterminately rather than showing a concrete value.
Link copied to clipboard
open fun isShowWhen(): Boolean
Whether the header time column is shown at all.
Link copied to clipboard
Whether the progress bar is rendered at all.