Android Guides | Samples

Android.App.Notification.MediaStyle Class

Notification style for media playback notifications.

See Also: Notification+MediaStyle


[Android.Runtime.Register("android/app/Notification$MediaStyle", DoNotGenerateAcw=true)]
public class Notification.MediaStyle : Notification+Style


In the expanded form, Notification.BigContentView, up to five Action structures specified with Builder.AddAction(Int32,ICharSequence,PendingIntent) will be shown as icon-only pushbuttons, suitable for transport controls. The bitmap given to Builder.SetLargeIcon(Bitmap) will be treated as album artwork. Unlike the other styles provided here, MediaStyle can also modify the standard-size Notification.ContentView; by providing action indices to Notification+MediaStyle.SetShowActionsInCompactView(Int32[]) you can promote up to 3 actions to be displayed in the standard view alongside the usual content. Notifications created with MediaStyle will have their category set to Notification.CategoryTransport unless you set a different category using Builder.SetCategory(String). Finally, if you attach a Token using Notification+MediaStyle.SetMediaSession(Token), the System UI can identify this as a notification representing an active media session and respond accordingly (by showing album artwork in the lockscreen, for example).


Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions:

The members of Android.App.Notification.MediaStyle are listed below.

See Also: Notification+Style

Public Constructors

Construct a MediaStyle object.
Construct a MediaStyle object.

Protected Constructors

Protected Properties


Public Methods

SetMediaSession(MediaSession+Token) : Notification+MediaStyle
Attach a Token to this Notification.
SetShowActionsInCompactView(params Int32[]) : Notification+MediaStyle
Request actions to be shown in the compact notification view.