【发布时间】:2016-01-05 17:24:25
【问题描述】:
这篇文章类似于Microsoft Band Web Tile not Updating,但标记为该问题答案的回复并没有真正解决我的问题,所以我想我会开始一个新的帖子。
我最近购买了一个 Band 2,并试图设置一个 Web 磁贴,该磁贴将从提供 JSON 格式数据(不是 rss 提要)的服务中提取数据。因此,我使用 5 步创作工具创建了一个单页非提要磁贴。当我第一次将磁贴部署到我的乐队时,它成功地轮询了服务并显示了数据;但是,从那时起,即使设置了刷新间隔(默认为 30 分钟),Web 磁贴上显示的数据也没有更新。
被调用的服务是一个 ASP.Net Web API 服务。它正在设置以下与缓存相关的标头:
缓存控制:无缓存 Pragma:无缓存 过期:-1 最后修改: 电子标签:
如果我查看该站点的 HTTP 日志,我可以看到我的服务端点大约每 30 分钟从我的手环/电话呼叫的位置,并且服务器在每次呼叫时都会以 200 OK 响应进行响应 - 我是在事务的服务器端没有看到 304 Not Modified 响应。
我的手环已与 Android 设备 (Samsung GS5) 配对。我也尝试过与 iPhone 6 配对,结果相同。带上的其他磁贴似乎工作正常(即 MS Health 应用程序附带的标准磁贴)。作为配对/重新配对的一部分,我已经进行了两次出厂重置,但这似乎没有帮助。我也尝试过重新启动两部手机(配对时)。这也无济于事。
我错过了什么?
作为参考,这里是 web tile 的 manifest.json 文件包含的内容(一些数据点的占位符:
{
"manifestVersion": 1,
"name": "<Name Here>",
"description": "<Description here>",
"version": 1,
"versionString": "1",
"author": "<Author Here>",
"organization": "",
"contactEmail": "",
"tileIcon": {
"46": "icons/tileIcon.png"
},
"icons": {},
"refreshIntervalMinutes": 30,
"resources": [
{
"url": "<URL Here>",
"style": "Simple",
"content": {
"_1_bg": "BG",
"_1_datestring": "DateString",
"_1_trend": "Trend",
"_1_direction": "Direction"
}
}
],
"pages": [
{
"layout": "MSBand_MetricsWithIcons",
"condition": "true",
"textBindings": [
{
"elementId": "12",
"value": "BG: {{_1_bg}}"
},
{
"elementId": "22",
"value": "{{_1_datestring}}"
},
{
"elementId": "32",
"value": "Trend: {{_1_trend}}, {{_1_direction}}"
}
]
}
],
"notifications": [
{
"condition": "{{_1_bg}} >= 250",
"title": "HIGH BG: {{_1_bg}}",
"body": "{{_1_datestring}}"
},
{
"condition": "{{_1_bg}} <= 80",
"title": "Low BG: {{_1_bg}}",
"body": "{{_1_datestring}}"
},
{
"condition": "{{_1_bg}} <= 55",
"title": "REALLY LOW: {{_1_bg}}",
"body": "{{_1_datestring}}"
}
]
}
【问题讨论】:
标签: microsoft-band