HackX123
HackX123

Reputation: 127

Setting periodic Live tile update

I have been developing a windows store app, where I need something like

  1. Periodically call a function that performs a http request and returns the response string
  2. Update the Live tile with the returned string
  3. These should happen only when the app is suspended/navigated away to start screen or something

(I have written the function to perform and return http request)

I referred to this link but I do not know where to put those code in my program. Should I create a Background task separately?

Upvotes: 1

Views: 385

Answers (1)

Nathan Kuchta
Nathan Kuchta

Reputation: 14172

You don't need to set up a background task. Simply make a call to StartPeriodicUpdate during your app initialization (perhaps after all of your UI has loaded). Windows will then continually update the tile on behalf of your app using the provided interval.

Upvotes: 1

Related Questions