0

I have stored pictures from my code in camera roll which I can access later because I've their names in my application data. But there seems no way to update cycle tile with the Uri of the images in the camera roll.

I tried storing (copying) images to my application data local folder "TileImages" whose Uri path should be like : "ms-appdata:///local/TileImages/11.jpg", but that too doesn't work.

Here's my code with a small modification:

        CycleTileData tileData = new CycleTileData
        {
            Title = "App Name",
            Count = 0,
        };

        tileData.CycleImages = await GetTilesImageUriAsync();
        // tileData shows correct Uri path's in Debug mode

        ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault();
        tile.Update(tileData);

Error:

An exception of type 'System.ArgumentException' occurred in mscorlib.ni.dll but was not handled in user code

Additional information: uri

1 Answers1

0

The Cycle Tile template in Windows Phone requires that the images be local and supports only the local URI. The images has to be within the XAP file (Embedded resources/Content) or the image has to be stored to the isolated storage.

The best way to implement the Cycle Tile with Camera Images is to download the images with some kind of background agent and save them in the isolated storage and use them for the CycleTile

Refer this link for getting the images from the phone folder.

Community
  • 1
  • 1
asitis
  • 3,023
  • 1
  • 31
  • 55