protected virtual async void Play() { try { switch (AudioPlayerState) { case AudioPlayerState.Closed: case AudioPlayerState.Stopped: if (_playerManager.CanPlay()) { PlayerManager.PlayTracks(AudioPlayerMode.Playlist); } break; case AudioPlayerState.Paused: PlayerManager.Play(); break; case AudioPlayerState.Playing: PlayerManager.Pause(); break; } } catch (Exception exception) { var dialogResult = ResourceService.GetString("Dialog_Result_Ok"); await _pageDialogService.DisplayAlertAsync("", exception.Message, dialogResult); } }