0

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?

Srikar Doddi
  • 15,499
  • 15
  • 65
  • 106
  • Couldn't you use push notification to update the users tiles? – BigL Feb 05 '12 at 18:11
  • 1
    A way I've heard recommended is once you're at the end of the 14 days (like day 12), start displaying some info on the tile like ('hey, open me!) – William Melani Feb 05 '12 at 18:11

2 Answers2

1

This has changed in Windows Phone 8. If the user has chosen your app for any of the lockscreen settings (Background, Content, or Status) the app will continue to run after the two weeks without the need for a launch by the user.

So if you have an application that the user decides to use as a part of their lock screen you are ok.

Otherwise I would go with setting a reminder the day you are going to expire. Each time the app is launched delete the reminder and make a new one two weeks out.

I also liked one of the comments above to change your tile status to "Launch me to get more updates".

Jason Short
  • 5,205
  • 1
  • 28
  • 45
1

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.

Francesc
  • 1,339
  • 4
  • 16
  • 34
  • I know background agents do not work in battery-saving mode and in other circumstances. I am trying to avoid over complicating the architecture of my app by adding a server side component for tile notifications. – Srikar Doddi Feb 05 '12 at 21:32
  • Also, WP7 devices can only have a total of 15 apps registered for push notifications per device. If the user installs 15 apps that use push notifications and your app is the 16th one installed, you’ll get a InvalidOperationException. – Srikar Doddi Feb 05 '12 at 22:31
  • Another way, would be using [ShellTitleScheduler](http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.shelltileschedule(v=vs.92).aspx), but it'd also require to set up a server side component. – Francesc Feb 07 '12 at 17:21
  • Moreover, there's an unknown limit on Background agents. **[It varies per device configuration and can be as low as 6](http://msdn.microsoft.com/en-us/library/hh202942(v=vs.92).aspx)** – Francesc Feb 07 '12 at 17:23