# BatchingMode

# BatchingMode

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/data/BatchingMode.kt+class:androidx.health.services.client.data.BatchingMode)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/services/client/data/BatchingMode "View this page in Java")

<br />

```
class BatchingMode
```

<br />

*** ** * ** ***

Batching mode during an active exercise when the device is in a non-interactive power state, used in[ExerciseConfig](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseConfig). Not applicable when device is in interactive state because exercise updates will be streaming.

## Summary

|                                         ### Public companion properties                                          |
|------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [BatchingMode](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/BatchingMode) | [HEART_RATE_5_SECONDS](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/BatchingMode#HEART_RATE_5_SECONDS()) Deliver smaller and more frequent batches of[DataType.HEART_RATE_BPM](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType#HEART_RATE_BPM())when the device is not interactive (e.g. screen is off). |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/BatchingMode#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/BatchingMode#hashCode())`()`                                                                                            |

## Public companion properties

### HEART_RATE_5_SECONDS

```
val HEART_RATE_5_SECONDS: BatchingMode
```

Deliver smaller and more frequent batches of[DataType.HEART_RATE_BPM](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType#HEART_RATE_BPM())when the device is not interactive (e.g. screen is off).

This setting significantly increases power consumption, and is intended to be used by apps which need to send data to a separate device (e.g. a connected phone or TV) for real-time visualisation. It has no effect if the device is interactive.

The exact power/performance tradeoff of this mode is device implementation dependent and batched updates may be aligned with other wake ups but target five second updates.  

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```  

### hashCode

```
open fun hashCode(): Int
```