locked
Storing http images in localstorage win8 for use in Secondary Tiles RRS feed

  • Question

  • App: HTML/Js 

    Storing http images in localstorage win8 for use in Secondary Tiles. I have an app that uses http image urls to display data but the Secondary Tile URI does not accept this and thus I know i need to store the image as a local file then reference to the local file but this is where the problems arise. I aint got a clue how to do this and any help or examples in JS would be most appriciated. I would idealy like to have a function where i can input a name and the url and then it returns a new Windows.Foundation.Uri().



    Dean Meehan | Student

    Wednesday, May 8, 2013 12:09 PM

Answers

  • The logo and wideLogo options for secondary tiles accept ms-appx:/// and ms-appdata:/// URIs for in-package images and those in your appdata local folder, respectively. Sounds like you’ll want to use the latter, which means downloading the image to local appdata, building the URI string for the secondary tile, and creating the Windows.Foundation.Uri object for the options.

    Scenario 1 of the Secondary tiles sample shows how to use the ms-appx:/// URIs which you can easily modify to use ms-appdata:///.


    Kraig

    Author, Programming Windows 8 Apps with HTML, CSS, and JavaScript, a free ebook from Microsoft Press

    Wednesday, May 8, 2013 5:09 PM