void AddPlayPauseAction(Notification.Builder builder) { LogHelper.Debug (Tag, "updatePlayPauseAction"); string label; int icon; PendingIntent intent; if (playbackState.State == PlaybackStateCode.Playing) { label = service.GetString (Resource.String.label_pause); icon = Resource.Drawable.ic_pause_white_24dp; intent = pauseIntent; } else { label = service.GetString (Resource.String.label_play); icon = Resource.Drawable.ic_play_arrow_white_24dp; intent = playIntent; } builder.AddAction (new Notification.Action (icon, label, intent)); }