C# Class Plugin.MediaManager.MediaNotificationManagerImplementation

Inheritance: IMediaNotificationManager
Exibir arquivo Open project: martijn00/XamarinMediaManager Class Usage Examples

Public Methods

Method Description
MediaNotificationManagerImplementation ( Android.Content.Context appliactionContext, MediaSessionCompat sessionToken, Type serviceType ) : System
StartNotification ( IMediaFile mediaFile ) : void
StartNotification ( IMediaFile mediaFile, bool mediaIsPlaying, bool canBeRemoved ) : void

When we start on the foreground we will present a notification to the user When they press the notification it will take them to the main page so they can control the music

StopNotifications ( ) : void
UpdateNotifications ( IMediaFile mediaFile, MediaPlayerStatus status ) : void

Private Methods

Method Description
AddActionButtons ( bool mediaIsPlaying ) : void
GenerateActionCompat ( int icon, string title, string intentAction ) : Android.Support.V4.App.Android.Support.V7.App.NotificationCompat.Action
SetMetadata ( IMediaFile mediaFile ) : void

Method Details

MediaNotificationManagerImplementation() public method

public MediaNotificationManagerImplementation ( Android.Content.Context appliactionContext, MediaSessionCompat sessionToken, Type serviceType ) : System
appliactionContext Android.Content.Context
sessionToken MediaSessionCompat
serviceType System.Type
return System

StartNotification() public method

public StartNotification ( IMediaFile mediaFile ) : void
mediaFile IMediaFile
return void

StartNotification() public method

When we start on the foreground we will present a notification to the user When they press the notification it will take them to the main page so they can control the music
public StartNotification ( IMediaFile mediaFile, bool mediaIsPlaying, bool canBeRemoved ) : void
mediaFile IMediaFile
mediaIsPlaying bool
canBeRemoved bool
return void

StopNotifications() public method

public StopNotifications ( ) : void
return void

UpdateNotifications() public method

public UpdateNotifications ( IMediaFile mediaFile, MediaPlayerStatus status ) : void
mediaFile IMediaFile
status MediaPlayerStatus
return void