I’m developing a windows phone app with a background player based on the windows phone 7.1 project template(so i have 2 projects). My question is how i dynamically set the list of tracks for the background player to play? I tried static fields but didn’t work and my guess is that i have to define a resource in the app.xaml but how it is done exactly? I need to share a List and an integer.
Thanks for the help!
The audio agent won’t be able to read any resources in the
Appobject (app.xaml).As far as I can see the only way to communicate between your app and the background audio is via the
BackgroundAudioPlayer.Instanceobject, theAudioTrack(see especially theTagproperty) and using files stored in Isolated Storage.This is described on MSDN here.
Also check out the Background Audio player in the MSDN code samples.