Search code examples
windows-8windows-runtimelive-tile

WinRT live tile on system startup


I have a live tile working which updates how many users are online and how many lobbies are open within the app. This begins updating when my app loses its visibility (no point it updating the live tile whilst the app is running), but I want it to update when I first turn the computer on.

I have had a look around and mentions of making the app a lock screen app have popped up but that is all, no explanation how to do it.

Does anyone know how to do this and provide a nice little explanation or link of how to do so?

Many thanks, Kevin


Solution

  • You should use push notifications for this kind of behaviour. This msdn link has more info:-

    Using tile notifications Choosing the right notification method to update your tile There are several mechanisms which can be used to update a live tile: Local API calls One-time scheduled notifications, using local content Push notifications, sent from a cloud server Periodic notifications, which pull information from a cloud server at a fixed time interval The choice of which mechanism to use largely depends on the content you want to show and how frequently that content should be updated. The majority of apps will probably use a local API call to update the tile when the app is launched or the state changes within the app. This makes sure that the tile is up-to-date when it launches and exits. The choice of using local, push, scheduled, or polling notifications, alone or in some combination, completely depends upon the app. For example, a game can use local API calls to update the tile when a new high score is reached by the player. At the same time, that same game app could use push notifications to send that same user new high scores achieved by their friends.