private void AddActionButtons(bool mediaIsPlaying) { // Add previous/next button based on media queue var canGoPrevious = MediaQueue?.HasPrevious() ?? false; var canGoNext = MediaQueue?.HasNext() ?? false; _builder.MActions.Clear(); if (canGoPrevious) { _builder.AddAction(GenerateActionCompat(Resource.Drawable.IcMediaPrevious, "Previous", MediaServiceBase.ActionPrevious)); } _builder.AddAction(mediaIsPlaying ? GenerateActionCompat(Resource.Drawable.IcMediaPause, "Pause", MediaServiceBase.ActionPause) : GenerateActionCompat(Resource.Drawable.IcMediaPlay, "Play", MediaServiceBase.ActionPlay)); if (canGoNext) { _builder.AddAction(GenerateActionCompat(Resource.Drawable.IcMediaNext, "Next", MediaServiceBase.ActionNext)); } }