With the new anniversary update sdk i have decided to change my background audio to use the new api. Everything works except that i need to make network calls when a track ends to get the next track or next playlist (8tracks.com app).
The new api allows network connectivity for buffering and downloading the song but after that the network connectivity is gone. At the bottom of this explanation it says that i will need an ApplicationTrigger to make those calls.
So I set one up and it's used in the foreground and background. When the song ends MediaPlayer.MediaEnded is triggered and then ApplicationTrigger.RequestAsync(); is called. The backgroundtask works fine if the app is in the foreground but if its in the background the await ApplicationTrigger.RequestAsync(); returns UnknownError. I have noticed that it will work fine if i'm debugging but if i'm not then the error occurs. Is it not possible to trigger an ApplicationTrigger from the new background audio api?