Language

Activity.MediaController Property

Definition

Gets the controller which should be receiving media key and volume events while this activity is in the foreground. -or- Sets a MediaController to send media keys and volume changes to.

public Android.Media.Session.MediaController? MediaController { [Android.Runtime.Register("getMediaController", "()Landroid/media/session/MediaController;", "")] get; [Android.Runtime.Register("setMediaController", "(Landroid/media/session/MediaController;)V", "")] set; }
[<get: Android.Runtime.Register("getMediaController", "()Landroid/media/session/MediaController;", "")>]
[<set: Android.Runtime.Register("setMediaController", "(Landroid/media/session/MediaController;)V", "")>]
member this.MediaController : Android.Media.Session.MediaController with get, set

Property Value

The controller which should receive events.

Attributes

Remarks

Gets the controller which should be receiving media key and volume events while this activity is in the foreground.

The controller is tied to this activity's window. Hardware volume controls do not always change the controller's session volume; for example, they may change the call volume instead. Set this property to null to restore the default behavior.

Android reference for android.app.Activity.getMediaController.

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