微软乐队瓷砖 [英] Microsoft Band tiles

查看:218
本文介绍了微软乐队瓷砖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建一个新的图块(TileManager.AddTileAsync)时,该图块不会出现在手机的Microsoft Health应用程序中.

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

另外,如果我遍历tile集合中的所有tile(使用TileManager.GetTilesAsync(),则返回的唯一是新tile -不返回带提供的默认tile.我是否假设由我创建的应用程序负责为这些磁贴提供存储机制和磁贴管理?将其存储在哪里?在电话的隔离存储中?

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?

推荐答案

假定您具有最新版本的Microsoft Health应用程序,则添加到Band 的所有自定义图块都应列为第三条"应用程序的管理磁贴"页面上的方磁贴".这样可以确保即使已卸载添加了Tile的应用程序,也可以从Band中删除Tiles.当由应用程序调用时,IBandTileManager.GetTilesAsync()将仅枚举以前由该应用程序添加的图块.也就是说,应用程序只会看到自己的Tiles,而看不到其他任何Tiles,也不会看到内置的Tiles.

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.

如果应用程序使用固定数量的自定义图块,我建议每个自定义图块使用固定(即静态)图块ID(与在将图块添加到Band时生成唯一的GUID相对).这样可以确保应用程序无需使用任何其他存储机制即可识别其每个Tile,而无需与Band配对的电话无关.

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.

如果应用程序生成动态数量的Tiles,那么显然它必须在特定Tile(ID)与该Tile所代表的实体之间存储映射.

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.

这篇关于微软乐队瓷砖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆