Using remote images with secondary live tiles in WP7 Mango

I’ve seen a few posts on Twitter and this blog post by Jeff Wilcox about the issues with using a remote image on secondary live tiles, so I thought it might be useful to share the workaround I developed for a new WP7 application I have been working on that makes heavy use of secondary tiles.

In short, the issue with using remote URIs for the BackgroundImage or BackBackgroundImage properties of secondary live tiles is that the tiles will disappear after restarting the phone. Worse, the tile still appears in the ShellTile.ActiveTiles list as though the tile is still pinned. This issue is mentioned in a few parts of the documentation, including here:

When creating a secondary Tile, the BackgroundImage and the BackBackgroundImage images must be created using a local resource.

I did some testing and determined that the issue is only caused by using a remote image URI during the initial tile creation — any tile updates that occur later on can use remote URIs without any trouble. In fact, you can update the tile with a remote URI immediately after creating it and the tile will still appear after the phone is restarted. (Note that the image displayed after a restart will be the static, local image and not the remote image. For my app, the tiles are regularly updated via push notifications but you could also update the tiles from within your app or background agent, etc.)
Continue reading Using remote images with secondary live tiles in WP7 Mango