Bug Tales: WP7 Secondary Live Tiles
In my spare time, I have written quite a few Windows Phone applications. By far the best and most popular one is CascadeSkier. In a recent update, I switched from pushing out live tiles from a centralized server to having the phone generate it’s own live tiles. It’s a fantastic feature from the Mango update. Not only can the app generate it’s own tiles in the background without my server initiating the process, but it an app can have as many tiles as you want!
But here’s a word of caution: The docs I read say that when you set the initial BackgroundImage in the call to ShellTile.Create, you must reference a local image URI. I tried it with a remote URI and it worked fine so I didn’t think twice and I shipped it. What the documentation didn’t say was that if you use a remote URI, when the phone reboots your tiles will disappear. ShellTile.ActiveTiles will still show them, but they won’t show up on the home screen!
Unfortunately, I discovered the bug after I had started the submission process so as soon as it was in the marketplace, I submitted another update which should hopefully reach phones soon. This update contains a workaround. I initially set the tile to a local URI and then I immediately attempt to update the tile with a remote URI. In theory the call to ShellTile.Create should be the last call you plan on making since you get punted back to the home screen but it appears that you’re still able to run a bit more code afterwards. Worst case is that the user sees the default image for 30 minutes until the background process kicks in and updates the tile.