WP7 file prepackaging / download OTA into isostore

241 views Asked by At

I'm making a windows phone 7 app that makes use of xml based data. I understand that I can prepackage xml files with the app (as part of the application content) and deploy them along with the XAP.

In future if I have to update the XML's on account of updated / changed data, what are the options I have?

Can I build in a method to have the user download the file? Will it overwrite the existing file?

If not, what are the other options I have if I choose to let the user download an updated XML file alone instead of asking the user to update the entire application?

1

There are 1 answers

0
Pedro Lamas On BEST ANSWER

I had a similar problem in the past, and this was my solution:

  • Bundle the XML files with the app as Content (so it got into the .xap file)
  • Everytime I run the app, I do two things:
    • Check if a XML files are on IsolatedStorage; if they are not (first run), copy them from the app data source folder to IsolateStorage
    • Check if the files that are now in the IsolatedStorage need to be updated; if so, download the new versions and update the IsolatedStorage.
  • Only use the XML files that are on IsolatedStorage