Search code examples
microsoft-band

Handling button events for a Band tile if the phone app is not running


If I understand the Microsoft Band SDK correctly, a Windows Phone application can create a custom tile, a page and a button on a Microsoft Band, and the phone app can handle the event that is raised when the user taps the button on his or her Band.

However Windows Phone applications are not running forever, they may be suspended or even terminated by the OS. What will happen with the button in that case? Will the page still be visible on the Band, and the Band button tap event trigger resume the phone application?

Thank you.

György


Solution

  • In order for a Windows application to receive events from the Band, it must be running (foreground or background). If the application is not running when the Tile is opened or any of its buttons pressed, no events will be raised (as there is no application context within which to raise them).

    This is a fundamental platform restriction with Windows 8. With Windows 10, it is theoretically possible for applications receiving input from the Band (such as Microsoft Health) to resume/communicate with other applications to, for example, pass information about Tile events. However, this likely requires updates to the Band firmware, the Microsoft Health application, as well as the Band SDK. I have no insight into if or when that will happen.