Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

( I'm not sure if this question belongs here, but since it is related to game development and I have no idea where else I should post this, I will post this here )

As the title says, what I am basically asking is if it is possible to update the livetile of an pure XNA game ( not SL + XNA hybrid )?

I've been thinking something like that whenever user launches the game, I would create an texture dynamically and then update the livetile to show that texture. Even better would be if I could schedule this code to run for example once a day, without requiring user to even launch the game.

Is this possible in WP7 or in WP8 ( is the WP8 SDK even publicly released yet? ) in pure XNA game? What about in XNA + SL hybrid?

share|improve this question
What part of updating isn't working? If you add the Microsoft.Phone.Shell.ShellTile libraries/namespace and follow the standard tutorial (…) doesn't it work? – Roy T. Sep 17 '12 at 17:07
Also, the WP8 SDK has only been released yet to people who had WP7 apps on the market, but it will soon be made available to all. – Roy T. Sep 17 '12 at 17:08
@RoyT. Ahh, thanks. I was aware of Microsoft.Phone.Shell namespace, but I wasn't sure how it could be used since it required Uri of the image, but that article clarified what I have to do. I will update whether I succeed or not. However, I'd still like to know if it is possible to schedule the code that updates the tile to run on a regular basis, without user needing to launch the game. ShellTileSchedule-class doesn't seem to allow to run any code, but rather just wants Uri of the image. – flai Sep 17 '12 at 17:20
up vote 2 down vote accepted

I managed to update the tile using following code:

public static class ApplicationInfo
    public static ShellTile ApplicationLiveTile
        get { return ShellTile.ActiveTiles.FirstOrDefault(); }

    public static void UpdateTile(Texture2D texture)
        const int TextureSize = 173;
        const string FilePath = "/Shared/ShellContent/tile.jpg";

        // Save texture to isolated storage
        IsolatedStorageFile isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication();
        using (IsolatedStorageFileStream stream = isolatedStorage.CreateFile(FilePath))
            texture.SaveAsPng(stream, TextureSize, TextureSize);

        // Update the tile
        ShellTile tile = ApplicationInfo.ApplicationLiveTile;
        if (tile != null)
            tile.Update(new StandardTileData()
                BackgroundImage = new Uri("isostore:" + FilePath, UriKind.Absolute),

I haven't yet tried to make scheduled updating of the live tile as I described in the OP, but it possibly can be done by using Windows Phone Scheduled Task Agent.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.