Partager via


Vibrator.ArePrimitivesSupported(Int32[]) Method

Definition

Query whether the vibrator supports the given primitives.

[Android.Runtime.Register("arePrimitivesSupported", "([I)[Z", "GetArePrimitivesSupported_arrayIHandler", ApiSince=30)]
public virtual bool[] ArePrimitivesSupported (params int[] primitiveIds);
[<Android.Runtime.Register("arePrimitivesSupported", "([I)[Z", "GetArePrimitivesSupported_arrayIHandler", ApiSince=30)>]
abstract member ArePrimitivesSupported : int[] -> bool[]
override this.ArePrimitivesSupported : int[] -> bool[]

Parameters

primitiveIds
Int32[]

Which primitives to query for.

Returns

Whether the primitives are supported.

Attributes

Remarks

Query whether the vibrator supports the given primitives.

The returned array will be the same length as the query array and the value at a given index will contain whether the effect at that same index in the querying array is supported or not.

If a primitive is not supported by the device, then <em>no vibration</em> will occur if it is played.

Use #areAllPrimitivesSupported(int...) to get a single combined result, or for convenience when querying exactly one primitive.

Java documentation for android.os.Vibrator.arePrimitivesSupported(int...).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to