AudioManager.ShouldVibrate(VibrateType) Method

Definition

Caution

deprecated

Returns whether a particular type should vibrate according to user settings and the current ringer mode.

[Android.Runtime.Register("shouldVibrate", "(I)Z", "GetShouldVibrate_IHandler")]
[System.Obsolete("deprecated")]
public virtual bool ShouldVibrate (Android.Media.VibrateType vibrateType);
[<Android.Runtime.Register("shouldVibrate", "(I)Z", "GetShouldVibrate_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member ShouldVibrate : Android.Media.VibrateType -> bool
override this.ShouldVibrate : Android.Media.VibrateType -> bool

Parameters

vibrateType
VibrateType

The type of vibrate. One of #VIBRATE_TYPE_NOTIFICATION or #VIBRATE_TYPE_RINGER.

Returns

Whether the type should vibrate at the instant this method is called.

Attributes

Remarks

Returns whether a particular type should vibrate according to user settings and the current ringer mode.

This shouldn't be needed by most clients that use notifications to vibrate. The notification manager will not vibrate if the policy doesn't allow it, so the client should always set a vibrate pattern and let the notification manager control whether or not to actually vibrate.

This member is deprecated. Applications should maintain their own vibrate policy based on current ringer mode that can be queried via #getRingerMode().

Java documentation for android.media.AudioManager.shouldVibrate(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

See also