Question

I'm developing a tidal data app which makes use of a live tile. The tile's data needs to be updated at the beginning of each day (i.e. 00:01). What would be the easiest way to do this?

I've had a good look at Microsoft's page 'How to implement background agents for Windows Phone' but I'm still getting nowhere.

I fetch new data from the Internet using a WebClient(). Does this mean I need to have separate instantiations of this class, one for the main application and the background agent?

EDIT: I've put the common classes used by both the app and background agent, in a class library which I then reference. This way code doesn't need to be duplicated between these projects. Working perfectly.

Was it helpful?

Solution

Does this mean I need to have separate instantiations of this class, one for the main application and the background agent?

Yes. You must think of the background agent as a separate application. Though there is ways to share data between your application and your background agent, but the extra complexity isn't worth it in your case.

Note that you can share the implementation of your class between the application and the background agent by putting it in a third project (and referencing this project from both the application and the agent).

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