MS Band, UWP

Microsoft Band Heart Rate Sample – UWP

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

nuget

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:

capabilitiesold

Removing what was added and running results in the following exception:

permissionsexception 

Which hints at the problem in the Additional Information.

For UWP change this to:

capabilitiesnew

Then you can use the following code (non-production ready Smile) to display the heart rate data:

Here’s the resulting app running on my desktop:

uwpapp

Code is on Github here https://github.com/peted70/msband-hr-uwp-

Tagged , ,

1 thought on “Microsoft Band Heart Rate Sample – UWP

Leave a Reply

Your email address will not be published. Required fields are marked *