Microsoft Band tiles

柔情痞子 提交于 2019-12-12 06:09:57

问题


When I create a new tile (TileManager.AddTileAsync) that tile does not appear in the Microsoft Health app on the phone.

Additionally, if I loop through all the tiles in the tiles collection (using TileManager.GetTilesAsync() that new tile is the only one that is returned -- the default tiles provided with the band are not returned. Am I correct in assuming that it is up to the app I create to provide a storage mechanism and tile management for these tiles? Where to store it? In isolated storage on the phone?


回答1:


Assuming you have the latest version of the Microsoft Health application, all custom Tiles added to the Band should be listed as a "Third Party Tile" on the Manage Tiles page of the application. This ensures that Tiles can be removed from a Band even when the application that added the Tile has been uninstalled. When called by an application, IBandTileManager.GetTilesAsync() will enumerate only Tiles that have previously been added by that application. That is, applications will only see its own Tiles and no others, nor will it see the built-in Tiles.

If the application uses a fixed number of custom Tiles I would recommend that each custom Tile use a fixed (i.e. static) Tile ID (as opposed to generating a unique GUID when adding the Tile to the Band). This ensures that application can identify each of its Tiles without using any other storage mechanism and regardless of the phone with which the Band happens to be paired.

If the application generates a dynamic number of Tiles, then obviously it must store a map between a particular Tile (ID) and the entity represented by that Tile.



来源:https://stackoverflow.com/questions/29222586/microsoft-band-tiles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!