Search code examples
c#windows-phone-7background-agents

How to set the expiration of a background task agent in windows phone 7 to never expire?


I am designing an application where the user selects the option to update his live tile and can forget about the app. Once he picks the option to update, I kick off a background task agent. But it looks like as per msdn, the background task agent will only run for upto two weeks.

How do I fire it again without having the user to come into the app?


Solution

  • It's not possible to run a Background Agent without rescheduling it every 14 days. Moreover, if the phone is in the battery-saving mode, it may not run the agent. So, you should find a better way to update the tile (Tile Push Notification).

    Or, if you want to go with the Bckground Agent, the day before expiring, update the tile saying that the user should open the app to continue getting the tile updated. But, if he info is useful, the user will tap on the tile to get more info.