Smart Watch

Smart Watch – Part 1

Wearable technology is here. We have Google Glass, various Smart Watches, personal fitness / eHealth devices; with new devices appearing almost daily. Many devices will connect to your Android phone or tablet over Bluetooth, but the I’m Watch is a Smart Watch which runs Android. The nice folks at imsmart.com have kindly loaned me a I’m Watch and in this short series we’ll take a look at developing for it.

I'm WatchThe first thing to note is that the OS running on the I’m Watch is actually a variant of Android 1.6 Donut, although there are some APIs which do not work: sensors, audio recording / routing, speech recognition, ConnectionManager(), option menus, vibration, IMEs, web browser, and input widgets which require alphanumeric characters. Some of these constraints are because of the physical display dimensions (240 x 240 pixels @ 220ppi) because there is no way that you can display a full alphanumeric keyboard with keys large enough to click on. There are some add on libraries which fill in some of these missing APIs: sensors, overlay menus, RTL helper, App configurator, numpad (numeric keyboard), and Bluetooth.

The main thing to allow for when designing for this device is the display size – it’s going to be much smaller than even the smallest Android phone, so you will need to think carefully about your UI and layout design to keep them useable on a small device. You’ll need to think carefully about the use of forms because of the small screen, the lack of alphanumeric keyboard, and also that you must keep your button sizes large enough to enable the user to reliably click them.

While the I’m Watch supports a touch screen, it only supports a single touch point, so you cannot use any multi-touch gestures such as pinch to zoom.

One thing which requires careful set up is connecting the device to adb so that you can install and debug your apps. On an Apple Mac this required a bit of jiggery pokery, and it took me a little while to find the instructions for how to do this. All of the information for getting this configured can be found here.

So that aside, let’s look at creating a simple app for the I’m Watch. The app we’re going to look at is similar to one that I developed for the Pebble watch. The main differences between the platforms are that the Pebble is a proprietary OS and software is developed in C, and the I’m Smart uses Android / Java. The physical differences are a monochrome eInk display of the Pebble versus the colour LCD display of the I’m Watch, and physical buttons on the Pebble and touchscreen on the I’m Watch.

The app itself is a simple app to time and record injury / stoppage time during a sporting event – my sport of choice being football (or soccer as it’s known in some parts of the world).

The basic display consist of five different times. The first is the actual time of day (it’s a watch after all, so we may want to know the time). We then have a main timer which shows to total time elapsed, another which shows the actual time played, plus two further timers which show the duration of the current stoppage, and the total amount of stoppages.

The core of the app is a state machine which has three possible states: Stopped, Started, and Paused. The controls transition between these states:

  • Stopped: a short click transitions to Started; a long click resets all timers to zero.
  • Started: a short click transitions to Paused; a long click transitions to Stopped.
  • Paused: a short click transitions to Started; a long click transitions to Stopped.

Rather than take up any of screen with a physical button, the whole of the screen will respond to these events.

In the next article in the series we’ll begin to look at the layouts and code to get this working. At the time of publication (Fridat 13th December 2013) I intend to formally test the app during tomorrow’s Football League Championship match between Watford and Sheffield Wednesday.

Many thanks to Sebastiano Poggi and the rest of the folks at i’m SpA for arranging the loan device which have made this series of articles possible.

© 2013, Mark Allison. All rights reserved.

Copyright © 2013 Styling Android. All Rights Reserved.
Information about how to reuse or republish this work may be available at http://blog.stylingandroid.com/license-information.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.