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 available vibrators.

open Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

open static CombinedVibration.ParallelCombination

Start creating a vibration that plays explicit effects in parallel on specific target 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 available vibrators.

This creates a parallel vibration that plays the given VibrationEffect across all available vibrators on the device at the same time.

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

describeContents

Added in API level 31
open fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

startParallel

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

Start creating a vibration that plays explicit effects in parallel on specific target vibrators.

A parallel combination takes one or more VibrationEffects mapped to explicit vibrator IDs to be performed simultaneously.

Return
CombinedVibration.ParallelCombination This value cannot be null.

Properties

CREATOR

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