MediaPlayer does not play on calling Play method when app is minimized
I want to start a sound, even when the app is minimized. The play action can be initiated from an App Service (Desktop Bridge). My app has the background audio capability and uses extended execution. So the app is not suspended and keeps running in the background. But if I start a sound using MediaPlayer when the app is minimized, the sound does not play. As soon as I open the app, the sound starts. Minimizing again will not affect the sound: it keeps playing.
Asking a clarifying question here, your app (the UWP part) starts minimized and your service tries to play something inside the UWP app via MediaPlayer, correct?
Wim Bokkers commented
I also included the extendedExecutionBackgroundAudio capability. This doesn't fix this issue, unfortunately.