The Microsoft Band is a wearable device in the form of a smart band with (some) smartwatch features that focuses on health and fitness tracking. The Band by default can track your steps, heart rate, distance travelled, calories burned, etc. via various sensors.
The Band can be paired with an iOS, Android, or Windows smartphone. It connects to the smartphone via Bluetooth. To pair a phone with the Band, the Microsoft Health app needs to be downloaded on the phone. A single phone can only be paired with a single Microsoft Band (and vice versa) at a time. Once paired, the Band can display notifications from the phone such as e-mails and messages, and apps on the phone (including the Microsoft Health app) can alter how the Band works, such as by adding and removing tiles.
There are currently two versions of the Band: The original Microsoft Band, released in Oct 2014, and the Microsoft Band 2 which was released on Nov 2015. The Band 2 incorporates five new sensors, slightly wider resolution (320x128 vs 320x106), and a curved-screen display, but otherwise has the same functionalty and features as the original Band. Apps made for Band 1 can be used for Band 2 and vice versa, though apps using a sensor exclusively for Band 2 are not backwards-compatible.
The Microsoft Band UI is made up of "tiles" which can be opened. By default, there are 11 tiles on the Band, and tiles can be added/removed via the Microsoft Health app or by another app on the phone. The Band can have a maximum of 13 tiles at a time. Each tile consists of up to 8 pages of content.
There are two different types of tiles, as defined by the Band SDK Documentation:
Each tile has their own:
The Microsoft Band SDK is the development platform necessary to build apps for the Microsoft Band. It is available for iOS, Android, and Windows mobile OSes. The app using the SDK must be built for and installed on the paired smartphone. The SDK then allows the app to customise the Band, including to create new tiles defined by the app and send messages/notifications, and receive sensor data from the Band. The official documentation for the SDK shows how to implement these functions in native code for iOS, Android, and Windows.
The Microsoft Band supports Windows, Android, and iOS mobile platforms.
The Band SDK allows apps to be built for either of these platforms to communicate with the Band. The SDK is built using native code (C# for Windows, Java for Android, and Objective-C for iOS, respectively) and the mobile app has to be built in native code if we are to make use of the SDK as shown in the official documentation. Microsoft has also provided sample apps for the Band in Windows, Android, and iOS as a starting point.
Our app needs to be built for mobile devices (as opposed to tablets or PCs) as we need the app on a device that the Lone Worker will be able to carry with them (along with the Band) all the time while working.
Our mobile platform of choice for this Proof of Concept application is Windows Phone 8.1.
Microsoft Band SDK supports Windows Phone as an official platform. The Band SDK for Windows devices is implemented natively on C#. Windows Phone 8.1 or later is required.
The reason why we chose Windows Phone as the initial platform for our mobile application is mainly because of our resource availability and client considerations. Windows Phone apps are typically built using Visual Studio, which is available for free for students, and contains a Windows mobile emulator. We were also able to borrow Windows Phone mobile devices from UCL. Also, Network Rail provides Windows Phone mobile devices as work phones to their lone workers and their current solution runs on Windows Phone. Furthermore, both Microsoft Band and Windows Phone are Microsoft products, whom we are working with.
The tool we used to develop our mobile app is Visual Studio Enterprise 2015, available for free to us through UCL CS's DreamSpark subscription, with the ReSharper add-on for C# (also free for students). Windows mobile apps can be written in either C#/XAML, C++/XAML, or JS/HTML. We chose to use C# and XAML for our app because it is the language used by the Band SDK for Windows Phone, and writing the rest of the app in the same language makes the app development process simpler. It is also the language we are most comfortable with among those three. Visual Studio also contains NuGet, a package manager for .NET apps which allows us to install and update essential packages such as the Band SDK to our app with ease.
We also considered other mobile platforms for our mobile application. Below are a list of the platforms we considered and the details on each:
Microsoft Band SDK supports iOS as an official platform. The Band SDK for iOS and its features is implemented natively on Objective-C. iOS 7 or later is required.
Native iOS development requires the use of Xcode, only available on Mac OS machines. This is a major problem as we do not have the adequate resources to develop on iOS as a group, as we only have access to one Mac OS PC and one iOS mobile device for testing. If we are to develop the app for iOS, we will only be able to work one at a time. A Mac OS PC is still required to build iOS apps even if we choose to develop the app on a non-native platform using Xamarin or Cordova/PhoneGap. Also, iOS development requires us to use Objective-C and/or Swift, which we are unfamiliar with.
Microsoft Band SDK supports Android as an official platform. The Band SDK for Android and its features is implemented natively on Android's version of Java. Android 4.2 (API 17) or later is required.
Native Android apps are developed on Android SDK, a slightly modified version of Java with Anrdoid features and Google APIs included, and typically developed using Android Studio. Android is the most widely used mobile OS among the general public. However, our clients Microsoft UK and Network Rail does not typically develop for Android or has capabilities to test our application on Android, nor do they provide Android mobile devices to their Lone Workers, so Android was not very suitable for our clients.
Xamarin is a cross-platform mobile development tool used to make apps that works simultaneously on iOS and Android with C#. Xamarin apps are structured with an iOS/Android layer that contains the UI and app layers (but still written on C#) and a Core Library layer that contains shared code such as business and data layers. Xamarin allows developers to add components to their apps, and they have a Microsoft Band SDK component that which we can potentially use, though we have not tested this yet. While their main products require a montly or annual payment, they also have a Starter edition that we can use for free, and should be enough to build our PoC. Xamarin apps can be built with an add-on to Visual Studio or their own Xamarin Studio. However, their Android and iOS development tools require access to Android SDK for Android and Xcode for iOS, and it is impossible to work on the iOS components on non-Mac PCs (Their tutorial claims that it is possible to work on the iOS components on a Windows PC connected to a Mac OS X PC through SSH, though we have not tried it yet). Also, our first try at using the Xamarin Studio (Starter edition) to run their sample app on Android was not successful.
Cordova is a tool that allows developers to build mobile apps with HTML, CSS, and JavaScript, targetting multiple platforms with one code base. PhoneGap is a distribution of Cordova that adds additional tools. There is no official SDK for Microsoft Band built on Cordova or PhoneGap, but we have found two third-party repositories that claims to have implemented the Microsoft Band SDK for Cordova/PhoneGap, one using Cordova and one using PhoneGap. However, our attempts at getting either third-party SDK to build were unsuccessful.
The code packages that we researched to use in our Windows Phone application are:
The Microsoft Band SDK is essential to build the core functionality of our app. It contains the functionality necessary to allow the app to communicate with the Band, pull sensor data, add additional tiles, and send a notification to the Band. It is available through the NuGet Package Manager.
Json.NET is a popular high-performance JSON framework for .NET. It allows us to serialize C# objects to JSON strings and deserialize JSON strings to C# objects with a single method call. We can use this to store app data as strings locally in the user's mobile device. It is available through the NuGet Package Manager.
>Microsoft HTTP Client Libraries is a package that contains methods that allows C# Windows apps to send requests over HTTP and process HTTP messages. It is essential to enable our app to communicate by sending HTTP requests to our web dashboard and handling the response. It is available through the NuGet Package Manager.
We also need to develop a web dashboard for the Head Office to be able to send and receive alerts and receive 'panic button' alarms from Lone Workers. It should also contain an online authentication systemthat ccan be accessed by Lone Workers via the mobile app. Based on our requirements, our web dashboard needs to do:
In order to fulfil the stated requirements, we researched the following services:
Heroku Platform is a cloud Platform-as-a-Service tool. It allows us to deploy our web dashboard online on their servers. The servers can run our web server code in Javascript, Ruby, Java, PHP, Python, Go, Scala, or Clojure and handles incoming HTTP requests. Heroku also provides sample applications for each language that allows us to develop an up and running web app quickly. Their documentation can be found on their dev center.
Node.js is a Javascript runtime environment for server-side Web applications. We used Node.js to develop our web dashboard based on Heroku's sample Javascript application. It allows for our web dashboard to handle HTTP requests such as GET and POST from our app. The documentation for Node.js can be accessed here.
Below are tools that we researched for our web dashboard but did not end up using in our current product. These tools should be considered for the future development of the product.
Microsoft Band web tile allows developers to deliver information to Microsoft Band from virtually any data source on the web. Web Tiles once set up will periodically fetch web resources (using JSON or XML formats) and delivering them to the web tile on the Band. Web tiles are controlled by the Microsoft Health app on the mobile device. Web tiles supports RSS and ATOM feeds. More information and details on how to implement it can be found on the documentation. Web Tiles could be used as an alternative way to send alerts from the Head Office to lone workers.
The Microsoft Health Cloud API allows client apps and services to make use of real-time user data from the Microsoft Band. It provides said data using RESTful APIs in a JSON format. The client apps can be web, windows (desktop) or windows (mobile) based. The API can be implemented in C# (Windows) or Javascript (Web). This API could be used to integrate real-time data of each worker's heart rate and other vitals data on the web dashboard.
Google Identity Platform is a set of identity tools from Google to quickly build an auth system. It contains the following tools that we can possibly use:
These tools could be used to build an online authentication system to implement user accounts.