toggleVibrator

abstract suspend fun toggleVibrator(deviceId: String, enabled: Boolean): CommandResponse

Toggles the vibrator on or off for the given deviceId.

Return

A CommandResponse indicating the result.

Parameters

deviceId

The identifier of the target device.

enabled

True to enable the vibrator, false to disable it.


abstract fun toggleVibrator(deviceId: String, enabled: Boolean, callback: (Result<CommandResponse>) -> Unit)

Callback-based version of toggleVibrator for Java interoperability.

Parameters

deviceId

The identifier of the target device.

enabled

True to enable the vibrator, false to disable it.

callback

Callback to receive the CommandResponse.