In my application i have a radio stream and get the currently playing song information from a service.
In addition I want the user to be able to listen to it in the background, this works fine with the AVAudioSession and running good.
But I struggle to understand how I can add Information to the Lock Screen via MPNowPlaying or how to use the RemoteControlReceive.
I tried making my way up from this sample https://github.com/jgold6/Xamarin-iOS-LockScreenAudio but cannot get the hang of this.
As soon as I implement the MPNowPlayingInfo into my Code I get an error on the SpringBoard.
MPNowPlayingInfo np = new MPNowPlayingInfo();
np.Artist = "SongArtist";
np.Title = "SongTitle";
np.Artwork = new MPMediaItemArtwork(image);
MPNowPlayingInfoCenter.DefaultCenter.NowPlaying = np;