How to Design an Android Wearable using Smart Bluetooth?

Chokkar G Jun 17 - 5 min read

Audio : Listen to This Blog.

We are living in a day and age, where technological innovations drive our daily life. Wearable technology has been talked for long, but in recent past we have come to see live products that help in our daily lives. Within the Android ecosystem, wearable technologies have a tremendous scope for growth, given the nature of open ecosystem surrounding it. In this article, we will present how MSys Android team helped Spree Sports, a leading fitness monitor wearable device come out to market with a feature rich and pleasing UI android application.
The ability to track performance and the body’s reactions to training or workouts is very important to fitness enthusiasts.

Bluetooth has been around since the mid-to-late 1990s and has become the standard for peer-to-peer networking of devices over short distances. One disadvantage is that it can draw a bit of power, and this becomes something of an issue on mobile devices, and even more so on wearable technology where the batteries need to be smaller still. Also two Bluetooth devices must be paired before they can communicate with each other. The pairing process needs to be performed only once but can be an unpleasant experience for the user

How MSys designed and implemented their Android mobile application

The Spree Sports headband is a far-reaching fitness monitor that takes your fitness to a whole new level. Spree is worn around your head in order to give the most precise reading of body temperature, heart rate and movement using biosensors.
Spree takes “step counting” to a new level by tracking exact distance and speed travelled with the mileage tracker. Spree can accurately measure your heart rate in a non-invasive and comfortable way.

We at MSys understood the client’s requirement and came up with the below UI. We independently implemented the complete functionality, including interfacing wit.

The key to using the Spree Sports headband is the Spree smart performance mobile app. While you exercise, the Spree fitness monitor tracks your body temperature, heart rate, distance, speed, time and calories burned. This biometric information simultaneously streams to your mobile app using Bluetooth smart technology. Since you can view an analysis of your progress in real time, your fitness goals become more clear and tangible.

One can observe calories burned during your workout with the calorie indicator, and track distance traveled or set target heart rate. You can even listen to your music library while using the app. This all-around smart performance app helps elevate your fitness training.

Bluetooth Low Energy, or Bluetooth LE for short, or BLE for even shorter still, was introduced as part of the Bluetooth 4.0 (sometimes called Bluetooth Smart) specification, and addresses these specific issues. As far as improved battery life is concerned, many manufacturers are claiming months or even years for some sensors. Google added BLE support to Android 4.3 (API 18).

Challenges Faced during development:

The first major challenge is in the BLE pairing process. For traditional Bluetooth development, the task of pairing two devices was largely the responsibility of the user, but with BLE that responsibility lies much more with the developer. That is a good thing because it makes the whole pairing process much more straightforward from our users’ perspective.

The other major difference is the actual communication itself. In traditional Bluetooth development there were a number of options. Fundamentally these were based on a socket architecture very similar to standard network sockets. Essentially our data is streamed over sockets, and it is a case of both devices knowing the format of that stream. BLE takes a different approach, and centers around attributes. An attribute is essentially an atomic piece of data (i.e. an integer or string) which is shared between both devices. Attributes may be used to either represent data or control how the sensor behaves. For example, in a heart rate monitor one attribute may hold the current heart rate value (data) and another may contain a setting for how often the heart rate value should be updated (behavior).

Finding BLE Devices:

To find BLE devices, you use the startLeScan() method. This method takes a BluetoothAdapter.LeScanCallback as a parameter. You must implement this callback, because that is how scan results are returned. Because scanning is battery-intensive, you should observe the following guidelines:

  • As soon as you find the desired device, stop scanning.
  • Never scan on a loop, and set a time limit on your scan. A device that was previously available may have moved out of range, and continuing to scan drains the battery.
	 * Activity for scanning and displaying available BLE devices.
	public class DeviceScanActivity extends ListActivity {
		private BluetoothAdapter mBluetoothAdapter;
		private boolean mScanning;
		private Handler mHandler;
		// Stops scanning after 10 seconds.
		private static final long SCAN_PERIOD = 10000;
		private void scanLeDevice(final boolean enable) {
			if (enable) {
				// Stops scanning after a pre-defined scan period.
				mHandler.postDelayed(new Runnable() {
					public void run() {
						mScanning = false;
				}, SCAN_PERIOD);
				mScanning = true;
			} else {
				mScanning = false;
			...    }
	...  }


By combining a developer’s imagination with Bluetooth Smart technology, the future of wearable Bluetooth technology is virtually unlimited. Bluetooth Smart creates a playground for companies willing to experiment with creative wearable solutions. Bluetooth technology is energy efficient, low in cost, offers high security and easy to work with, and it takes into account sustainability concerns for reducing the carbon footprint.



Leave a Reply

MSys Technologies creates an iOS healthcare application, which can communicate with a consumer electronic fitness device through Bluetooth services. Read the Case Study, “Mobile Health Monitor”