ChangeLogTokenRequest.Builder


public static final class ChangeLogTokenRequest.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.changelog.ChangeLogTokenRequest.Builder


Builder for ChangeLogTokenRequest

Summary

Public constructors

Builder()

Public methods

ChangeLogTokenRequest.Builder addDataOriginFilter(DataOrigin dataOriginFilter)
ChangeLogTokenRequest.Builder addRecordType(Class<? extends Record> recordType)
ChangeLogTokenRequest build()

Returns Object of ChangeLogTokenRequest

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder ()

Public methods

addDataOriginFilter

Added in API level 34
public ChangeLogTokenRequest.Builder addDataOriginFilter (DataOrigin dataOriginFilter)

Parameters
dataOriginFilter DataOrigin: list of package names on which to filter the data.

If not set logs from all the sources will be returned This value cannot be null.

Returns
ChangeLogTokenRequest.Builder This value cannot be null.

addRecordType

Added in API level 34
public ChangeLogTokenRequest.Builder addRecordType (Class<? extends Record> recordType)

Parameters
recordType Class: type of record for which change log is required. At least one record type must be set. This value cannot be null.

Returns
ChangeLogTokenRequest.Builder This value cannot be null.

build

Added in API level 34
public ChangeLogTokenRequest build ()

Returns Object of ChangeLogTokenRequest

Returns
ChangeLogTokenRequest This value cannot be null.

Throws
IllegalArgumentException if record types are empty