# DiscoveryClient


```
interface DiscoveryClient : HasApiKey, OptionalModuleApi
```

<br />

*** ** * ** ***

Client interface for discovering operational Matter devices on the local network.

## Summary

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

### Inherited functions

From [com.google.android.gms.common.api.HasApiKey](https://developers.google.com/android/reference/com/google/android/gms/common/api/HasApiKey.html) `https://developers.home.google.com/reference/kotlin/com/google/android/gms/common/api/internal/ApiKey<O!>!` `https://developers.google.com/android/reference/com/google/android/gms/common/api/HasApiKey.html#getApiKey--()` From [com.google.android.gms.common.api.OptionalModuleApi](https://developers.google.com/android/reference/com/google/android/gms/common/api/OptionalModuleApi.html) `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developers.google.com/android/reference/com/google/android/gms/common/Feature.html!>!` `https://developers.google.com/android/reference/com/google/android/gms/common/api/OptionalModuleApi.html#getOptionalFeatures--()`

## Public functions

### resolveService

```
fun resolveService(request: ResolveServiceRequest!): Task<ResolveServiceResult!>!
```

Resolves addresses and TXT records on the local network for the Matter DNS-SD service represented by `https://developers.home.google.com/reference/kotlin/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.google.com/android/reference/com/google/android/gms/tasks/Task.html` will complete with an instance of `https://developers.home.google.com/reference/kotlin/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.google.com/android/reference/com/google/android/gms/common/api/ApiException.html`, with the status code being `https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes.html#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.google.com/android/reference/com/google/android/gms/tasks/Task.html` will fail with an `https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html` with the status code `https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes.html#DEVELOPER_ERROR`.