Updating LockScreen Background

2

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??

c#
windows-phone-7
windows-phone-8
lockscreen
asked on Stack Overflow Dec 1, 2013 by MohanRajNK • edited Dec 1, 2013 by Cristian Lupascu

1 Answer

0

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

answered on Stack Overflow Dec 2, 2013 by pinckerman • edited Dec 2, 2013 by pinckerman

User contributions licensed under CC BY-SA 3.0