Search code examples
windows-phone-8media-playerlockscreen

Windows Phone8: MediaStateChanged event is not called if screen is locked


I have an WP Silverlight App that uses XNA MediaPlayer to play songs continuously. After phone goes to lock screen, music plays for a while and stopped when it plays to end. Next song is not played. It seems that MediaPlayer.MediaStateChanged is never fired under lock screen. However, if I run the same app from Visual Studio with USB cable connected, it does it nicely. How to keep logic running when not used with VS?


Solution

  • I was reading this and this could help my case nicely: http://blogs.msdn.com/b/jaimer/archive/2010/11/01/running-a-windows-phone-application-under-the-lock-screen.aspx