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 |
createParallel(effect: VibrationEffect)Create a vibration that plays a single effect in parallel on all 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 effects in parallel on one or more vibrators. |
| Inherited functions | |
|---|---|
| Properties | |
|---|---|
| static Parcelable.Creator<CombinedVibration!> | |
Public methods
createParallel
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
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(android.os.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
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. |