/// <summary> /// Fires when playlist changes to a new track /// </summary> /// <param name="sender"></param> /// <param name="args"></param> void playList_TrackChanged(MyPlaylist sender, object args) { string title; if (args is string) { title = args.ToString(); } else { title = Playlist.CurrentTrackName; } UpdateUVCOnNewTrack(title); ApplicationSettingsHelper.SaveSettingsValue(Constants.CurrentTrack, sender.CurrentTrackName); if (foregroundAppState == ForegroundAppStatus.Active) { //Message channel that can be used to send messages to foreground ValueSet message = new ValueSet(); message.Add(Constants.Trackchanged, title); BackgroundMediaPlayer.SendMessageToForeground(message); } }
/// <summary> /// Clears playlist for re-initialization /// </summary> public void ClearPlaylist() { instance = null; }