Tools of the Trade: Getting Setup to Code for Microsoft Band


There is a very competent and capable app for your Microsoft Band in your App Store called Microsoft Health, which is available for iOS, Android and, of course, Windows Phone. But Microsoft Health is just one way you can expose and relay information from the myriad of sensors you’ve got on your wrist, and you’ve likely got ideas on where you’d like to take it.

In my first article I wrote briefly about IoT in general, and how a device like Microsoft’s Band really opens the door for .NET developers looking to take part in the wearables game. In this article, I’m going to lay out the tools and frameworks that you’ll need in order to develop for the Band.  We’ll also start up a project and install the components we need to get our app ready to talk to the device. If you’re a fairly experience developer and want to dive right in, jump down to the end for the summary and have at’er.

Setting up Your Cloud Account

As we collect data from the sensors, we’re going to want to feed it up to the cloud so that as we develop the backend of the app, we have access to all the data.

It only takes about 3 minutes and 17 seconds to give yourself a free shot at using cloud services. Seriously. So pop over to Azure and get yourself signed up for the free trial.

Signup for Azure Here

Also, check out this link for information on MSDN as you may also qualify for free monthly Azure benefits as well.

Readying Your Development Environment

Next, we need a bit of tooling. This isn’t a complicated list and you likely have everything you need already, however, I speak to, meet with and mentor many developers who are locked into older versions of tooling, so here’s a list to follow along with so that we’re all on the same page:

  • Microsoft Visual Studio 2013 (MSDN or Community Edition)
  • USB cable for your Windows Phone
  • USB charging/sync cable for your Band (included in the box)

I have a plethora of USB cables from a variety of sources. I have noticed that the Nokia cable that came in the box with the charger is a better quality cable and have had less problems with it than others (from cheap chargers, other phones and cameras).

Creating the Project

This part’s pretty easy, just pop open Visual Studio, select File –> New Project, and then switch to the Store Apps/Windows Phone Apps category. From there, Pick the Blank App template and name your project AliveAndSafe.

image

We’ll talk more about the application we’re creating next time, but if you’ve read my previous post you know where I’m going with this. Winking smile

Adding the Band SDK

Next up is getting the components in our project that we’ll use to interact with the Band and trap information relayed to us from the device itself.

Open up the Package Manager Console (View –> Other Windows –> Package Manager Console) and type the following command:

install-package microsoft.band -pre

As expected, this pulls down the DLLs needed for our app and adds references to:

  • Microsoft.Band
  • Microsoft.Band.Phone
  • Microsoft.Band.Store

Having a peek inside, we can see a number of interesting objects that we can create, collections to iterate over, sensors to subscribe to and states that we can inspect.

image

We’re going to dive into these in more detail as we build out our app.

Designing for Microsoft Band

An important thing to note is that the Band has a really strong and capable design language. After wearing it for only a couple of hours I felt like I had a good sense of what it was trying to do and where I needed to go, which is amazing given the number of sensors and the limited UI that the device presents!

As such, we should likely be good citizens here and respect the design intent that the device put forth. You can find more information on what the designers were thinking by downloading the Microsoft Band Visual Guidelines document.

Next Steps

Okay…easy lifting today, here’s what we did:

  • Prepared our development environment by grabbing Visual Studio, signing up for Microsoft Azure, and getting our cables.
  • Created a Windows Phone application using the Blank App template.
  • Added the Microsoft.Band pre-release package from Nuget to pull in our dependencies.

In the next article we’re going to talk a little bit more about our application that we’re building and get a tile onto the Band to represent our application.

Happy Coding! Smile

Comments (2)

  1. Walt Bobrowski says:

    So far, so good. Looking forward to this! Thanks in advance.

  2. Walt Bobrowski says:

    Looking forward to this! Thanks in advance.

Skip to main content