private void OnPlaybackStateChanged(PlaybackStateCompat state) { var message = new PlaybackStateChangedMessage { State = (PlaybackState)state.State }; MessagingCenter.Send(message, nameof(PlaybackStateChangedMessage)); }
private void PlaybackStateChanged(PlaybackStateChangedMessage message) { PlaybackState = message.PlaybackState; if (message.PlaybackState == PlaybackState.Playing) { _trackProgressTimer.Start(); } else { _trackProgressTimer.Stop(); } }