1

I have two projects, one of them is a "Windows phone application" and the other is a "Windows phone Audio player Agent".

In order to provide the AudioPlayer with something like "the next track" I need a way to communicate between my application and the agent.

My first attempt was a singleton, I don't know exactly why, but both of them create their own instance of the singleton.

So what is the best/easiest way to communicate ?

ctacke
  • 66,480
  • 18
  • 94
  • 155
Philiiiiiipp
  • 705
  • 1
  • 9
  • 24

1 Answers1

-2

The MSDN Sample about Audio Agents explains precisely how to do this.

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
  • How do you mean this, they assume there that the given tracks are already on the IslolatedStorage and that they know which track is going to be played next. But I have allot of different Playlists and different tracks which are not necessarily on the IsolatedStorage. So I need a way to say the AudioPlayer Agent which playlist he should play, and if he should shuffle and/or repeat – Philiiiiiipp Nov 09 '11 at 17:03
  • 3
    I think you need to read a lot more up about background agents in general, before you continue with this. – Claus Jørgensen Nov 09 '11 at 18:48
  • providing example of how this can be made when you get tracks dynamically (through some API, and not having them locally) would greatly improve your answer – Vivienne Fosh Mar 29 '12 at 14:01
  • 2
    And writing his entire app would also do improve the answer I guess. – Claus Jørgensen Mar 29 '12 at 17:05