setVibratorDuration

abstract suspend fun setVibratorDuration(deviceId: String, duration: VibratorDuration): CommandResponse

Sets the duration of the vibration for the given deviceId.

Return

A CommandResponse indicating the result.

Parameters

deviceId

The identifier of the target device.

duration

The duration of the vibration, as defined by VibratorDuration.


abstract fun setVibratorDuration(deviceId: String, duration: VibratorDuration, callback: (Result<CommandResponse>) -> Unit)

Callback-based version of setVibratorDuration for Java interoperability.

Parameters

deviceId

The identifier of the target device.

duration

The duration of the vibration, as defined by VibratorDuration.

callback

Callback to receive the CommandResponse.