Reputation: 10227
I want to potentially update the tile of my WP8 app periodically - no more frequently than every hour or two. However, I don't want my app to have to be running for this background task to take place (will query a WAMS and, based on the returned results, update the WP8 app's tile).
Is this possible, or do background tasks (I found this tutorial on how to create one: http://thesociablegeek.com/windows-8/livetiles/modifying-live-tiles-in-a-background-process/) require that the app that hosts them be running?
IOW, what I basically need is similar to a Windows Service, that his hosted by the OS, not a/my particular app.
Upvotes: 3
Views: 6828
Reputation: 10620
Here's a guide how to use so called Background Agents in Windows Phone 7 or 8:
Background agents for Windows Phone
Basically you can schedule simple task to be executed every 30 minutes, even the main application is not running. There are system requirements on these tasks like memory cap constraint 6 MB for WP7 and 11 MB for WP8 tasks, run time of each task 25 seconds, and limited available APIs.
Upvotes: 4
Reputation: 1269
I would recommend that you code your tile update logic as a periodic task and then configure it to run in background. this way, you don't have to maintain your app running in background.
Hope this helps.
Upvotes: 4