Tuesday, September 4, 2012

Windows 8: Could not initialize secondary tile with provided arguments.

In a Windows 8 application I tried to add a secondary tile when I got the following exception:

“Could not initialize secondary tile with provided arguments.”

I discovered that the issue was cause by the image I specified. I was using a URI pointing to a resource on a website. According to the documentation this is not supported.

The only valid options are:

  • ms-appx:/// : A path within the deployed app package. This path is resolved for languages and DPI plateau supported by the app.
  • ms-appdata:///local/ : A file found in the per-user app storage.

So if you want to use a resource from the web, you have to download it first and add it to the users local storage folder.

Remark: Note that images are supported for secondary tile notification updates.

No comments: