Although very simple I thought this was worth blogging as I didn’t see too many UWP (Universal Windows Platform) samples using the Microsoft Band SDK. I gave a talk recently at the Microsoft IOT Hackathon at the Microsoft Offices in Reading which involved streaming the heart rate data from the band up to Azure event hubs and I wanted to create a UWP app for it. The first step is to invoke the Nuget package manager inside Visual Studio 2015 RC to add the Band SDK to my project
The current Nuget package for the band SDK doesn’t write the app manifest correctly for UWP so you need to make a slight modification to get the code to work. This is what it writes:
Removing what was added and running results in the following exception:
Which hints at the problem in the Additional Information.
For UWP change this to:
Then you can use the following code (non-production ready ) to display the heart rate data:
Here’s the resulting app running on my desktop:
Code is on Github here https://github.com/peted70/msband-hr-uwp-