Reputation: 399
I play sounds with MediaElement
. But I want it to continue playing if the screen is locked.
I read here that we should do it this way:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
I have added it to the page's constructor, but nothing happens, and after locking, it stops the sound.
I don't want to play it even when the app isn't in foreground. but just under the lock screen. (It's WP8)
Upvotes: 0
Views: 440
Reputation: 1911
This may do the trick
PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;
Upvotes: 1