0

I am currently working on an application which requires fetching of data from the net. But if the user presses the start button or starts any other application, the data fetching process in my application is interrupted and the app throws exceptions like WebException.

In-order to prevent this I have forced the app to work under background even if user deactivates it. Is this a bad approach and will the tomb-stoning the app and resuming the state from state dictionary approach be a better one?

Milan Aggarwal
  • 5,104
  • 3
  • 25
  • 54

1 Answers1

1

If you're downloading larger amounts of data, you may be better off using the BackgroundTransferService -it is covered in the second lesson of the Windows Phone Training Kit

Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166
  • it may not be a file. It may be a JSON or XML response also – Milan Aggarwal Aug 13 '12 at 12:41
  • JSON and XML are still data -- it's an architectural choice whether you push the transfer to the background (so it'll be there on resumption), or whether you handle it over a tombstone cycle yourself. The only comment I would make is that I would avoid the "run under lockscreen" option if you can, as it may affect the number of people willing to *try* your application (let alone the effect it can have on battery life, etc.) – Rowland Shaw Aug 13 '12 at 13:02
  • i guess you are limited by the number of requests you can add for each application. This doesn't help, as I have to make numerous requests. Anyways thanks for your help :) – Milan Aggarwal Aug 25 '12 at 07:45