ReadMedicalResourcesInitialRequest


@ExperimentalPersonalHealthRecordApi
public final class ReadMedicalResourcesInitialRequest extends ReadMedicalResourcesRequest


A class to make initial requests when reading MedicalResources with HealthConnectClient.readMedicalResources.

This feature is dependent on the version of HealthConnect installed on the device. To check if it's available call HealthConnectFeatures.getFeatureStatus and pass FEATURE_PERSONAL_HEALTH_RECORD as an argument. An UnsupportedOperationException would be thrown if the feature is not available.

Summary

Public constructors

ReadMedicalResourcesInitialRequest(
    int medicalResourceType,
    @NonNull Set<@NonNull String> medicalDataSourceIds,
    int pageSize
)

Public methods

boolean
equals(Object other)
final @NonNull Set<@NonNull String>

Only MedicalResources belong to one of the MedicalDataSources represented by these IDs will be returned.

final int

Only MedicalResources with this MedicalResourceType will be returned.

int
@NonNull String

Inherited methods

From androidx.health.connect.client.request.ReadMedicalResourcesRequest
final int

The maximum number of MedicalResources to be read.

Public constructors

ReadMedicalResourcesInitialRequest

Added in 1.1.0-beta02
public ReadMedicalResourcesInitialRequest(
    int medicalResourceType,
    @NonNull Set<@NonNull String> medicalDataSourceIds,
    int pageSize
)

Public methods

equals

public boolean equals(Object other)

getMedicalDataSourceIds

Added in 1.1.0-beta02
public final @NonNull Set<@NonNull StringgetMedicalDataSourceIds()

Only MedicalResources belong to one of the MedicalDataSources represented by these IDs will be returned. An empty set is permitted, it means MedicalResources from all available apps will be included in the response. An IllegalArgumentException might be thrown if any ID is deemed as invalid.

getMedicalResourceType

Added in 1.1.0-beta02
public final int getMedicalResourceType()

Only MedicalResources with this MedicalResourceType will be returned. An IllegalArgumentException might be thrown if an invalid type is used, see MedicalResourceType for valid values.

hashCode

public int hashCode()

toString

public @NonNull String toString()