CombinedVibration
public abstract class CombinedVibration
extends Object implements Parcelable
| java.lang.Object | |
| ↳ | 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.
See also:
Summary
Nested classes | |
|---|---|
class | CombinedVibration.ParallelCombination A combination of haptic effects that should be played in multiple vibrators in parallel. |
Inherited constants |
|---|
Fields | |
|---|---|
public static final Creator<CombinedVibration> | CREATOR
|
Public methods | |
|---|---|
static CombinedVibration | createParallel(VibrationEffect effect) Create a vibration that plays a single effect in parallel on all vibrators. |
int | describeContents() Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
static CombinedVibration.ParallelCombination | startParallel() Start creating a vibration that plays effects in parallel on one or more vibrators. |
Inherited methods | |
|---|---|
Fields
Public methods
createParallel
public static CombinedVibration createParallel (VibrationEffect effect)
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. |
| Returns | |
|---|---|
CombinedVibration | The combined vibration representing the single effect to be played in all vibrators. This value cannot be null. |
describeContents
public int describeContents ()
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.
| Returns | |
|---|---|
int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
startParallel
public static CombinedVibration.ParallelCombination startParallel ()
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.
| Returns | |
|---|---|
CombinedVibration.ParallelCombination | This value cannot be null. |
See also:
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.