I try to make a Windows Phone app which plays sounds to help you fall asleep. I use SoundEffect class so that I can mix multiple sound files. The certification requirements says
"An app can play media in the background while it is running even when its primary function is not related to music or video. An app that plays music, audio, or sound effects must meet the following requirements:" "The SoundEffect class must not be used to play a continuous background music track in an app." So if the SoundEffect class plays continuos music under locked screen is ok, right?
I made a timer with DispatcherTimer class, so that the user can set the time when sounds stop, so the battery won't go dead. But the certification requirements says
"All apps that run under a locked screen must stop any UI updates, active timers, and other non-critical processing when notified that the screen is locked." So I can't use that, because my app has to be able to run under locked screen. What can I do to stop the music playing after a time interval or at a set time?