0
votes

I created a simple Web Tile for Microsoft Band 2 using https://developer.microsoftband.com/WebTile. The tile installed without trouble and initially showed correct values, but it never updated. I added a notification to see if anything was happening, and the notification does get fired when the phone refreshes content, but the data is never updated even though the data changes in the feed.

Slightly sanitized feed:

<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Title</title>
    <link>http://website.com/band</link>
    <description>Band Tile</description>
    <language>en-US</language>
    <copyright>2015 Company</copyright>
    <lastBuildDate>Sun, 01 Nov 2015 19:25:21 Z</lastBuildDate>
    <item>
      <link>http://company.com/band/635820027213013187</link>
      <title>635820027212075628</title>
      <description>2</description>
    </item>
  </channel>
</rss>

The only data I'm trying to update on the Tile is the <description> value. The <link> and <title> didn't change at first, but I added the datetime (in ticks) in hopes of convincing the app to act on the change, but no luck.

I'm using an Android phone for the Microsoft Health App.

1

1 Answers

2
votes

If the web server provides an ETag value in its HTTP response, then the web tile will provide that value in its next HTTP request "If-None-Match" header to avoid downloading the same content again. Does the HTTP server you are using support ETags and if so is the value being changed on the server each time the feed content changes?

Simnilarly, the "Last-Modified" response header will be used (if provided by the server) in the next request to set the "If-Modified-Since" header. So, if the server supports this header then it is important that the Last-Modified date be set each time the feed content changes.

If the Web Tile is a feed tile (i.e. a page is shown on the Band for each new item of the feed) then additionally items of the feed will be checked to see if they match a previously seen item. For an RSS feed, the match uses the values tagged by "guid" or "pubDate" if available, otherwise a hash of the entire item.

Since your feed example does not have "guid" or "pubDate" tags for the item, the all item hash should apply. Thus the change in the value of the description to something that does not match one of the previous 8 item descriptions should cause it to be seen as new.

If you have created a feed tile using your feed data, and the first time the feed contains an item with a description of "1" then a page should be created on a Band showing that "1". Then on the next update when the feed contains an item with a description of "2" then the Band should get a new page showing that "2".

If you have created a non-feed tile (e.g. a tile with only a single page) then the page(s) on the Band should reflect the web data from the most recent sync (so long as the ETag and Last-Modified are set correctly if they are supported by the server).

For background updating, the "refreshIntervalMinutes" specified in the manifest must also elapse from the last update before a new attempt to update is made. However, if you force a sync using that option within the MS Health app then the "refreshIntervalMinutes" will be ignored.