Condividi tramite


AudioManager.WiredHeadsetOn Property

Definition

Caution

deprecated

Checks whether a wired headset is connected or not. -or- Sets audio routing to the wired headset on or off.

[System.Obsolete("deprecated")]
public virtual bool WiredHeadsetOn { [Android.Runtime.Register("isWiredHeadsetOn", "()Z", "GetIsWiredHeadsetOnHandler")] get; [Android.Runtime.Register("setWiredHeadsetOn", "(Z)V", "GetSetWiredHeadsetOn_ZHandler")] set; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("isWiredHeadsetOn", "()Z", "GetIsWiredHeadsetOnHandler")>]
[<set: Android.Runtime.Register("setWiredHeadsetOn", "(Z)V", "GetSetWiredHeadsetOn_ZHandler")>]
member this.WiredHeadsetOn : bool with get, set

Property Value

true if a wired headset is connected. false if otherwise

Attributes

Remarks

Property getter documentation:

Checks whether a wired headset is connected or not.

This is not a valid indication that audio playback is actually over the wired headset as audio routing depends on other conditions.

This member is deprecated. Use AudioManager#getDevices(int) instead to list available audio devices.

Java documentation for android.media.AudioManager.isWiredHeadsetOn().

Property setter documentation:

Sets audio routing to the wired headset on or off.

This member is deprecated. Do not use.

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