次の方法で共有


Vibrator.AreEffectsSupported(Int32[]) Method

Definition

Query whether the vibrator natively supports the given effects.

[Android.Runtime.Register("areEffectsSupported", "([I)[I", "GetAreEffectsSupported_arrayIHandler", ApiSince=30)]
public virtual int[] AreEffectsSupported (params int[] effectIds);
[<Android.Runtime.Register("areEffectsSupported", "([I)[I", "GetAreEffectsSupported_arrayIHandler", ApiSince=30)>]
abstract member AreEffectsSupported : int[] -> int[]
override this.AreEffectsSupported : int[] -> int[]

Parameters

effectIds
Int32[]

Which effects to query for.

Returns

Int32[]

An array containing the systems current knowledge about whether the given effects are natively supported by the device, or not.

Attributes

Remarks

Query whether the vibrator natively supports the given effects.

If an effect is not supported, the system may still automatically fall back to playing a simpler vibration instead, which is not optimised for the specific device. This includes the unknown case, which can't be determined in advance, that will dynamically attempt to fall back if the optimised effect fails to play.

The returned array will be the same length as the query array and the value at a given index will contain #VIBRATION_EFFECT_SUPPORT_YES if the effect at that same index in the querying array is supported, #VIBRATION_EFFECT_SUPPORT_NO if it isn't supported, or #VIBRATION_EFFECT_SUPPORT_UNKNOWN if the system can't determine whether it's supported or not, as some hardware doesn't report its effect capabilities.

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

Java documentation for android.os.Vibrator.areEffectsSupported(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