Search code examples
windows-phone-7live-tilebackground-agents

What is the best way to manage data in my Windows Phone application, given the lack of a service?


I have some data that I use to populate the textboxes in my windows phone app, and update live tiles and such.

However, I have had to employ a background agent to help with my app, since it needs to be updated every hour, on the hour.

I cannot reference the parent project, since that leads to a circular reference. I cannot duplicate the code, since that introduces redundancy and the chance of messing things up (Surprisingly, when I tried this, I got an unreachable code detected warning).

Should I save the data in a csv or xml file, and if so, how do I access it from both the parent app and the agent?


Solution

  • Windows Phone supports SQLite, I believe. Use that to store your data, and put the data access code in a separate library that both your application and the background agent use.