次の方法で共有


AudioManager.GetVibrateSetting(VibrateType) Method

Definition

Caution

deprecated

Returns whether the user's vibrate setting for a vibrate type.

[Android.Runtime.Register("getVibrateSetting", "(I)I", "GetGetVibrateSetting_IHandler")]
[System.Obsolete("deprecated")]
public virtual Android.Media.VibrateSetting GetVibrateSetting (Android.Media.VibrateType vibrateType);
[<Android.Runtime.Register("getVibrateSetting", "(I)I", "GetGetVibrateSetting_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member GetVibrateSetting : Android.Media.VibrateType -> Android.Media.VibrateSetting
override this.GetVibrateSetting : Android.Media.VibrateType -> Android.Media.VibrateSetting

Parameters

vibrateType
VibrateType

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

Returns

The vibrate setting, one of #VIBRATE_SETTING_ON, #VIBRATE_SETTING_OFF, or #VIBRATE_SETTING_ONLY_SILENT.

Attributes

Remarks

Returns whether the user's vibrate setting for a vibrate type.

This shouldn't be needed by most clients that want to vibrate, instead see #shouldVibrate(int).

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.getVibrateSetting(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

  • <xref:Android.Media.AudioManager.SetVibrateSetting(Android.Media.VibrateType%2c+Android.Media.VibrateSetting)>
  • ShouldVibrate(VibrateType)