Language

AudioManager.ActionHeadsetPlug Field

Definition

Broadcast Action: Wired Headset plugged in or unplugged.

[Android.Runtime.Register("ACTION_HEADSET_PLUG")]
public const string ActionHeadsetPlug;
[<Android.Runtime.Register("ACTION_HEADSET_PLUG")>]
val mutable ActionHeadsetPlug : string

Field Value

Attributes

Remarks

Broadcast action for a wired headset being plugged in or unplugged. A manifest-declared receiver cannot receive this broadcast; register a receiver explicitly with RegisterReceiver(BroadcastReceiver, IntentFilter).

The intent contains these extra values:

  • state: 0 for unplugged, 1 for plugged in.:
  • name: a human-readable headset type.:
  • microphone: 1 if the headset has a microphone, 0 otherwise.:

Java documentation for android.media.AudioManager.ACTION_HEADSET_PLUG.

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