# DiscoveryClient

public interface **DiscoveryClient** implements HasApiKey\<Api.ApiOptions.NoOptions\> OptionalModuleApi Client interface for discovering operational Matter devices on the local network.

### Public Method Summary

|---|---|
| abstract Task\<[ResolveServiceResult](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceResult)\> | [resolveService](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/DiscoveryClient#resolveService(com.google.android.gms.home.matter.discovery.ResolveServiceRequest))([ResolveServiceRequest](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest) request) Resolves addresses and TXT records on the local network for the Matter DNS-SD service represented by `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest`. |

## Public Methods

#### public abstract Task\<[ResolveServiceResult](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceResult)\>
**resolveService** ([ResolveServiceRequest](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest) request)

Resolves addresses and TXT records on the local network for the Matter DNS-SD
service represented by `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest`. Note that this API may be used only to resolve Matter
commissionable or operational service records (i.e. _matter._tcp, or
_matterc._udp).

On success, the `https://developers.home.google.com/android/reference/com/google/android/gms/tasks/Task` will
complete with an instance of `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/DnsSdServiceInfo` including the information about the resolved service.

If the service was not resolved, then the task will fail with an `https://developers.home.google.com/android/reference/com/google/android/gms/common/api/ApiException`,
with the status code being `https://developers.home.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes#TIMEOUT`.

If an unsupported service type is provided in the request, orthis is called when
`https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT`
is lower than `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O_MR1`,
then the `https://developers.home.google.com/android/reference/com/google/android/gms/tasks/Task` will fail
with an `https://developers.home.google.com/android/reference/com/google/android/gms/common/api/ApiException`
with the status code `https://developers.home.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes#DEVELOPER_ERROR`.