共用方式為


TelephonyManager.SetVoicemailVibrationEnabled Method

Definition

Sets the per-account preference whether vibration is enabled for voicemail notifications.

[Android.Runtime.Register("setVoicemailVibrationEnabled", "(Landroid/telecom/PhoneAccountHandle;Z)V", "GetSetVoicemailVibrationEnabled_Landroid_telecom_PhoneAccountHandle_ZHandler", ApiSince=26)]
public virtual void SetVoicemailVibrationEnabled (Android.Telecom.PhoneAccountHandle? phoneAccountHandle, bool enabled);
[<Android.Runtime.Register("setVoicemailVibrationEnabled", "(Landroid/telecom/PhoneAccountHandle;Z)V", "GetSetVoicemailVibrationEnabled_Landroid_telecom_PhoneAccountHandle_ZHandler", ApiSince=26)>]
abstract member SetVoicemailVibrationEnabled : Android.Telecom.PhoneAccountHandle * bool -> unit
override this.SetVoicemailVibrationEnabled : Android.Telecom.PhoneAccountHandle * bool -> unit

Parameters

phoneAccountHandle
PhoneAccountHandle

The handle for the PhoneAccount for which to set the voicemail vibration setting.

enabled
Boolean

Whether to enable or disable vibration for voicemail notifications from a specific PhoneAccount.

Attributes

Remarks

Sets the per-account preference whether vibration is enabled for voicemail notifications.

Requires that the calling app is the default dialer, or has carrier privileges (see #hasCarrierPrivileges, or has permission android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE.

This member is deprecated. Use android.provider.Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS instead.

Java documentation for android.telephony.TelephonyManager.setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean).

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