lcj
lcj

Reputation: 1797

When creating a tile for Microsoft Band shoud we use a specific guid?

The documentation says to use:

Guid tileGuid = Guid.NewGuid();

but the guid is commonly used for referring back to the tile and getting children elements, etc. Should we be generating a static guid? How can we check if the tile exists on the band before running our app unless we are referring to a static guid.

I have the same question about pages. If we are creating specific pages should we be using static guids for them?

Upvotes: 1

Views: 90

Answers (1)

Phil Hoff -- MSFT
Phil Hoff -- MSFT

Reputation: 2016

If your application creates one and only one Tile, then a static Guid isn't technically necessary as IBandTileManager.GetTilesAsync() will only ever return a single Tile. If your application never modifies existing Tile pages then, similarly, you need not give them a static Guid.

That said, I would recommend using a static Guid for a Tile and to change the Guid if you ever change the Tile's configuration (i.e. icons or layouts). That allows your application to determine the "version" of the Tile on any given Band.

For Tile pages, it depends on the way in which the pages will be used. Is there a fixed number of pages within the Tile whose content changes? If so, then use a static Guid so that you can modify specific pages. If the pages represent just one item in a queue, with new pages added and old pages falling off, but the content of each page never changing, then a static Guid isn't necessary.

Upvotes: 3

Related Questions