GetMedicalDataSourcesRequest


@ExperimentalPersonalHealthRecordApi
public final class GetMedicalDataSourcesRequest


Request to read medical data sources using HealthConnectManager#getMedicalDataSources

If no package names are set in a request, all data sources from all packages will be returned. Otherwise the response is limited to the requested package names per permission enforced in HealthConnectClient.getMedicalDataSources

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

Public methods

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

Only MedicalDataSources created by the apps with these package names will be returned.

int
@NonNull String

Public constructors

GetMedicalDataSourcesRequest

Added in 1.1.0-beta02
public GetMedicalDataSourcesRequest(@NonNull List<@NonNull String> packageNames)

Public methods

equals

public boolean equals(Object other)

getPackageNames

Added in 1.1.0-beta02
public final @NonNull List<@NonNull StringgetPackageNames()

Only MedicalDataSources created by the apps with these package names will be returned.

hashCode

public int hashCode()

toString

public @NonNull String toString()