Hello as part of an app that plays relaxing music in the background using the BackgroundMediaPlayer
, I would like to implement a way of turning off the music after a set time..
What I was thinking was to have a TimerPicker
for the user to pick when the music should stop and then add Timer as a supported task type to my MusicBackgroundTask under the Declarations in the appxmanifest.
Then properly in some way use a ThreadPoolTimer
in my MusicBackgroundTask Windows Runtime Component to stop the music when it ticks, but I really cant find anywhere online that explains how to make timers in a background task work.
So if anyone have a good link that explains or better some working code it would be a great help, thank you very much..