Android.Media.AudioManager.ActionHeadsetPlug Field
Broadcast Action: Wired Headset plugged in or unplugged.

Syntax

[Android.Runtime.Register("ACTION_HEADSET_PLUG")]
public const string ActionHeadsetPlug

Remarks

Broadcast Action: Wired Headset plugged in or unplugged. You cannot receive this through components declared in manifests, only by explicitly registering for it with Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver, Android.Content.IntentFilter).

The intent will have the following extra values:

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

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1