# MeasureClientExtensionKt

Added in 1.0.0

*** ** * ** ***


```
public final class MeasureClientExtensionKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/MeasureCapabilities` | `https://developer.android.com/reference/androidx/health/services/client/MeasureClientExtensionKt#(androidx.health.services.client.MeasureClient).getCapabilities()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/MeasureClient receiver)` Returns the `https://developer.android.com/reference/androidx/health/services/client/data/MeasureCapabilities` of this client for the device. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Void.html` | `https://developer.android.com/reference/androidx/health/services/client/MeasureClientExtensionKt#(androidx.health.services.client.MeasureClient).unregisterMeasureCallback(androidx.health.services.client.data.DeltaDataType,androidx.health.services.client.MeasureCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/MeasureClient receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType<@https://developer.android.com/reference/androidx/annotation/NonNull ?, @https://developer.android.com/reference/androidx/annotation/NonNull ?> dataType, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/MeasureCallback callback )` Unregisters the given `https://developer.android.com/reference/androidx/health/services/client/MeasureCallback` for updates of the given `https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType`. |

## Public methods

### getCapabilities

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/MeasureClientExtension.kt+function:getCapabilities)

```
public static final @NonNull MeasureCapabilities getCapabilities(@NonNull MeasureClient receiver)
```

Returns the `https://developer.android.com/reference/androidx/health/services/client/data/MeasureCapabilities` of this client for the device.

This can be used to determine what `https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType`s this device supports for live measurement. Clients should use the capabilities to inform their requests since Health Services will typically reject requests made for `https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType`s which are not enabled for measurement.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/MeasureCapabilities` | a `https://developer.android.com/reference/androidx/health/services/client/data/MeasureCapabilities` for this device |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/health/services/client/HealthServicesException` | if Health Service fails to process the call |

### unregisterMeasureCallback

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/MeasureClientExtension.kt+function:unregisterMeasureCallback)

```
public static final @NonNull Void unregisterMeasureCallback(
    @NonNull MeasureClient receiver,
    @NonNull DeltaDataType<@NonNull ?, @NonNull ?> dataType,
    @NonNull MeasureCallback callback
)
```

Unregisters the given `https://developer.android.com/reference/androidx/health/services/client/MeasureCallback` for updates of the given `https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType<@https://developer.android.com/reference/androidx/annotation/NonNull ?, @https://developer.android.com/reference/androidx/annotation/NonNull ?> dataType` | the `https://developer.android.com/reference/androidx/health/services/client/data/DeltaDataType` that needs to be unregistered |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/MeasureCallback callback` | the `https://developer.android.com/reference/androidx/health/services/client/MeasureCallback` which was used in registration |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/health/services/client/HealthServicesException` | if Health Service fails to process the call |