Added in API level 31

CombinedVibration


abstract class CombinedVibration : Parcelable
kotlin.Any
   ↳ android.os.CombinedVibration

A CombinedVibration describes a combination of haptic effects to be performed by one or more Vibrators. These effects may be any number of things, from single shot vibrations to complex waveforms.

Summary

Nested classes

A combination of haptic effects that should be played in multiple vibrators in parallel.

Inherited constants
Public methods
open static CombinedVibration

Create a vibration that plays a single effect in parallel on all vibrators.

open Int

open static CombinedVibration.ParallelCombination

Start creating a vibration that plays effects in parallel on one or more vibrators.

Inherited functions
Properties
static Parcelable.Creator<CombinedVibration!>

Public methods

createParallel

Added in API level 31
open static fun createParallel(effect: VibrationEffect): CombinedVibration

Create a vibration that plays a single effect in parallel on all vibrators. A parallel vibration that takes a single VibrationEffect to be performed by multiple vibrators at the same time.

Parameters
effect VibrationEffect: The VibrationEffect to perform. This value cannot be null.
Return
CombinedVibration The combined vibration representing the single effect to be played in all vibrators. This value cannot be null.

describeContents

Added in API level 31
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

startParallel

Added in API level 31
open static fun startParallel(): CombinedVibration.ParallelCombination

Start creating a vibration that plays effects in parallel on one or more vibrators. A parallel vibration takes one or more VibrationEffects associated to individual vibrators to be performed at the same time.

Return
CombinedVibration.ParallelCombination This value cannot be null.

Properties

CREATOR

Added in API level 31
static val CREATOR: Parcelable.Creator<CombinedVibration!>