VibratorEnvelopeEffectInfo


class VibratorEnvelopeEffectInfo : Parcelable
kotlin.Any
   ↳ android.os.vibrator.VibratorEnvelopeEffectInfo

Provides information about the vibrator hardware capabilities and limitations regarding waveform envelope effects. This includes:

  • Maximum number of control points supported.
  • Minimum and maximum duration for individual segments.
  • Maximum total duration for an envelope effect.

This information can be used to help construct waveform envelope effects with VibrationEffect.WaveformEnvelopeBuilder. When designing these effects, it is also recommended to check the VibratorFrequencyProfile for information about the supported frequency range and the vibrator's output response.

Summary

Inherited constants
Public methods
Int

Boolean
equals(other: Any?)

Long

Retrieves the maximum duration supported between two control points within an envelope effect, in milliseconds.

Long

Retrieves the maximum duration supported for an envelope effect, in milliseconds.

Int

Retrieves the maximum number of control points supported for an envelope effect.

Long

Retrieves the minimum duration supported between two control points within an envelope effect, in milliseconds.

Int

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<VibratorEnvelopeEffectInfo!>

Public methods

describeContents

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

equals

fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getMaxControlPointDurationMillis

fun getMaxControlPointDurationMillis(): Long

Retrieves the maximum duration supported between two control points within an envelope effect, in milliseconds.

If the device supports envelope effects (check android.os.VibratorInfo#areEnvelopeEffectsSupported), this value will be positive. Devices with envelope effects capabilities guarantee support for durations up to at least 1 second. If the device does not support envelope effects, this method will return 0.

Return
Long the maximum allowed duration between two control points in an envelope effect, or 0 if envelope effects are not supported.

getMaxDurationMillis

fun getMaxDurationMillis(): Long

Retrieves the maximum duration supported for an envelope effect, in milliseconds.

If the device supports envelope effects (check android.os.VibratorInfo#areEnvelopeEffectsSupported), this value will be positive. Devices with envelope effects capabilities guarantees a maximum duration equivalent to the product of getMaxSize() and getMaxControlPointDurationMillis(). If the device does not support envelope effects, this method will return 0.

Return
Long The maximum duration (in milliseconds) allowed for an envelope effect, or 0 if envelope effects are not supported.

getMaxSize

fun getMaxSize(): Int

Retrieves the maximum number of control points supported for an envelope effect.

If the device supports envelope effects (check android.os.VibratorInfo#areEnvelopeEffectsSupported), this value will be positive. Devices with envelope effects capabilities guarantee support for a minimum of 16 control points. If the device does not support envelope effects, this method will return 0.

Return
Int the maximum number of control points allowed for an envelope effect, or 0 if envelope effects are not supported.

getMinControlPointDurationMillis

fun getMinControlPointDurationMillis(): Long

Retrieves the minimum duration supported between two control points within an envelope effect, in milliseconds.

If the device supports envelope effects (check android.os.VibratorInfo#areEnvelopeEffectsSupported), this value will be positive. Devices with envelope effects capabilities guarantee support for durations down to at least 20 milliseconds. If the device does not support envelope effects, this method will return 0.

Return
Long the minimum allowed duration between two control points in an envelope effect, or 0 if envelope effects are not supported.

hashCode

fun hashCode(): Int
Return
Int a hash code value for this object.

toString

fun toString(): String
Return
String a string representation of the object.

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

static val CREATOR: Parcelable.Creator<VibratorEnvelopeEffectInfo!>