Question

How to update the lockscreen image from the isolated storage when the phone is playing music["show artist when playing music" is turned on in the lockscreen settings].?

It throws an exception

System.Exception: The requested resource is in use. (Exception from HRESULT: 0x800700AA) at Windows.Phone.System.UserProfile.LockScreen.SetImageUri(Uri value)

Or is there any way to find whether the phone is playing music or not??

Was it helpful?

Solution

I'm pretty sure that you can, there should be a property called State or something similar in the class that manage the device audio.

In XNA there's the property

Microsoft.Xna.Framework.Media.MediaPlayer.State == MediaState.Playing

you should have something like this.

Or try with MediaPlayer.GameHasControl

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top