Skip to content
AF
Health Connect reference

ActivityIntensityRecord: Health Connect activity intensity data

Read from Google’s documentation on 2026-10-03 · Google’s reference page last updated 2026-08-26

ActivityIntensityRecord is Health Connect's activity intensity record — an Interval record in Google's Activity category. Its read permission is android.permission.health.READ_ACTIVITY_INTENSITY; its write permission is android.permission.health.WRITE_ACTIVITY_INTENSITY. It supports 4 aggregate metrics (DURATION_TOTAL, INTENSITY_MINUTES_TOTAL, MODERATE_DURATION_TOTAL and VIGOROUS_DURATION_TOTAL). Mandatory fields per Google's table: activityIntensityType, endTime, metadata and startTime.

What Google says ActivityIntensityRecord is

Represents intensity of an activity.

Intensity can be either moderate or vigorous.

Each record requires the start time, the end time and the activity intensity type.

The ability to insert or read this record type is dependent on the version of Health Connect installed on the device. To check if available: call androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus and pass androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as an argument.

Quoted from Google’s ActivityIntensityRecord Jetpack reference, last updated 2026-08-26, read 2026-10-03.

Class
androidx.health.connect.client.records.ActivityIntensityRecord
Google's category
Activity
Record type
Interval
Unit class
none named in Google's table
Mandatory fields
activityIntensityTypeendTimemetadatastartTime
Added in (Jetpack)
1.2.0-alpha06
Feature flag
FEATURE_ACTIVITY_INTENSITY

Permissions

The exact strings Google’s data-types table declares for ActivityIntensityRecord. Google’s page: “Before requesting any permissions, your app must declare them in the manifest.”

AccessPermission stringFramework reference
Readandroid.permission.health.READ_ACTIVITY_INTENSITYAPI 36 · U Ext 16
Writeandroid.permission.health.WRITE_ACTIVITY_INTENSITYAPI 36 · U Ext 16
AndroidManifest.xml
<uses-permission android:name="android.permission.health.READ_ACTIVITY_INTENSITY" />
<uses-permission android:name="android.permission.health.WRITE_ACTIVITY_INTENSITY" />
Kotlin — the same strings from the Jetpack helper
import androidx.health.connect.client.permission.HealthPermission
import androidx.health.connect.client.records.ActivityIntensityRecord

val permissions = setOf(
    HealthPermission.getReadPermission(ActivityIntensityRecord::class),
    HealthPermission.getWritePermission(ActivityIntensityRecord::class),
)

The 6 fields of ActivityIntensityRecord

Types and descriptions as Google’s reference prints them. The range column quotes Google’s own range annotation or sentence; a dash means Google states none, which is not the same as no validation.

FieldTypeAllowed rangeGoogle’s description
activityIntensityTypemandatoryInt—Type of activity intensity (moderate or vigorous).
endTimemandatoryInstant—End time of the record.
endZoneOffsetZoneOffset?—User experienced zone offset at endTime, 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.
metadatamandatoryMetadata—Set of common metadata associated with the written record.
startTimemandatoryInstant—Start time of the record.
startZoneOffsetZoneOffset?—User experienced zone offset at startTime, 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.

Aggregate metrics

The AggregateMetric constants Google defines on ActivityIntensityRecord. The value type is the T in Google’s AggregateMetric<T> signature. Every aggregate metric across all records.

MetricValue typeGoogle’s description
ActivityIntensityRecord.DURATION_TOTALDurationMetric identifier to retrieve the total duration of activity intensity regardless of the type from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
ActivityIntensityRecord.INTENSITY_MINUTES_TOTALLongMetric identifier to retrieve the number of weighted intensity minutes from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
ActivityIntensityRecord.MODERATE_DURATION_TOTALDurationMetric identifier to retrieve the total duration of moderate activity intensity from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
ActivityIntensityRecord.VIGOROUS_DURATION_TOTALDurationMetric identifier to retrieve the total duration of vigorous activity intensity from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.

Google’s read-data guide: “For cumulative types like StepsRecord, use aggregate() instead of readRecords() to avoid double counting from multiple sources and improve accuracy.” and “The aggregation API also contains logic to handle duplicate records, and lessens the chances of rate limiting.”

Constants

The 2 const val values Google’s reference lists on ActivityIntensityRecord, with the integer each maps to.

ConstantValueGoogle’s description
ActivityIntensityRecord.ACTIVITY_INTENSITY_TYPE_MODERATE0Moderate intensity activity
ActivityIntensityRecord.ACTIVITY_INTENSITY_TYPE_VIGOROUS1Vigorous intensity activity.

Read ActivityIntensityRecord in Kotlin

The shape of Google’s own read example, with ActivityIntensityRecord and its names filled in. Get the client with HealthConnectClient.getOrCreate(context) after checking getSdkStatus.

readRecords
import androidx.health.connect.client.HealthConnectClient
import androidx.health.connect.client.records.ActivityIntensityRecord
import androidx.health.connect.client.request.ReadRecordsRequest
import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Instant

suspend fun readActivityIntensity(
    client: HealthConnectClient,
    startTime: Instant,
    endTime: Instant,
): List<ActivityIntensityRecord> {
    val response = client.readRecords(
        ReadRecordsRequest(
            ActivityIntensityRecord::class,
            timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
        )
    )
    // One page of up to pageSize records (default 1000); follow
    // response.pageToken for the rest.
    return response.records
}
aggregate
import androidx.health.connect.client.HealthConnectClient
import androidx.health.connect.client.records.ActivityIntensityRecord
import androidx.health.connect.client.request.AggregateRequest
import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Instant
import java.time.Duration

suspend fun aggregateActivityIntensity(
    client: HealthConnectClient,
    startTime: Instant,
    endTime: Instant,
): Duration? {
    val response = client.aggregate(
        AggregateRequest(
            metrics = setOf(ActivityIntensityRecord.DURATION_TOTAL),
            timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
        )
    )
    // get() is declared as returning a nullable value.
    return response[ActivityIntensityRecord.DURATION_TOTAL]
}

Setting up the client, the permission flow and Play Console declaration: integrating Health Connect step by step.

HealthKit counterpart

No verified HealthKit counterpart. The cross-platform matrix only pairs metrics checked against both Apple’s and Google’s documentation, and ActivityIntensityRecord is not among them yet. A similarly named Apple type may exist on the HealthKit reference, but a name match is not a verified mapping.

The metric on other platforms

This guide lists ActivityIntensityRecord beside the types on the other platforms this site covers whose own descriptions name the same metric, each quoted, with how each one is read.

Questions

What permission does ActivityIntensityRecord need?
Google's Health Connect data-types table (read 2026-10-03) declares android.permission.health.READ_ACTIVITY_INTENSITY for reading ActivityIntensityRecord and android.permission.health.WRITE_ACTIVITY_INTENSITY for writing it, and says apps must declare permissions in the manifest before requesting them.
Which aggregate metrics does ActivityIntensityRecord support?
Google's Jetpack reference defines 4 on ActivityIntensityRecord: DURATION_TOTAL (AggregateMetric<Duration>), INTENSITY_MINUTES_TOTAL (AggregateMetric<Long>), MODERATE_DURATION_TOTAL (AggregateMetric<Duration>) and VIGOROUS_DURATION_TOTAL (AggregateMetric<Duration>). Pass them in the metrics set of an AggregateRequest and read each back from the AggregationResult.
Which constants does ActivityIntensityRecord define?
Google's reference lists 2 constants on ActivityIntensityRecord, including ACTIVITY_INTENSITY_TYPE_MODERATE = 0 and ACTIVITY_INTENSITY_TYPE_VIGOROUS = 1. Store the constant name or the value it maps to, and treat values you do not recognise as unknown.
Is ActivityIntensityRecord an interval, instantaneous or series record?
Google's data-types table lists ActivityIntensityRecord as Interval, and defines that column as indicating "whether the data is recorded at an instant in time or over an interval". Its mandatory fields are activityIntensityType, endTime, metadata and startTime.

Other Activity records

All Activity records →

Sources checked

Google’s descriptions are quoted for identification; the page layout, the capsule and the cross-platform pairing are AIFitnessAPI’s. Generated from Google’s pages by a script, not typed by hand — the same data is behind every page in the Health Connect reference.

← All Health Connect records · Every permission string