About This Book
Wearable computing is the paradigm that entails lightweight, miniature computers that are worn much like clothing such that the user and the computer can interact at any time, as needed. "Wearable" is short for wearable computing device. Almost every day, the consumer, technology, and business news tell us about new and innovative wearable technology products such as smart watches, fitness sensors, smart shirts, belts, contact lenses, and more. We live in exciting times, because "wearables" are poised to find a useful and interesting place in our daily lives. In the long run, wearable technology shows potential in diverse arenas ranging from consumer, fitness, home automation, work, and more. A few of us modern human "pioneers" have already commenced to find value in wearables. Much like the motor car long ago and the smartphone in recent memory, many innovations start out as being "unnecessary" but convenient; but before long, some catch on and even reach that tipping point after which they are perceived as "necessities." Wearable technology is an interesting intersection of fashion, fitness, efficiency, productivity, and more. A diversity of Android Wear and Google Fit devices from a diversity of major manufacturers and brand names have commenced to arrive in the mass consumer marketplace. Consumers are likely to find Android Wear and Google Fit-based devices and associated Apps engaging and exciting. Software developers will likely find developing Apps for Android Wear and Google Fit, exciting and challenging in about equal measure.
This Book
This is an "introductory" book on the "new and future looking" topic of wearables in the AndroidT1 and Google ecosystem. This is a technical book on wearable Computing and application software development, specifically for the Android Wear and Google Fit platforms, which were both released in 2014.
Target Audience
This book has been written for a range of reading audiences including wearable enthusiasts, technologists, and software developers. The hands-on-development sections covered in this book are particularly aimed at Android and Java software developers who are interested in Android Wear and Google Fit App development. Prior experience with the Java programming language is somewhat of a prerequisite for engaging with the substantial development and hands-on sections in this book. Prior experience with Android development is ideal; yet this book does concisely cover the basics of Android software development, including the setting up and configuration of an Android 5 (Lollipop) development environment from scratch. It covers the basics of Android platform and also lists resources needed for deeper exploration in that arena. This book will help readers understand the new Gradle and Android Studio-based build system.
What This Book Covers
This book covers relevant history and background about the general subject of wearable computing, before heading into the world of Android software development. Wearables represent a unique category of devices; and therefore, a distinct approach to software development and interaction design is applicable.
Many developers, including myself, can sometimes be quite impatient about diving right into installing the relevant development tools and commencing writing software from the get-go. Yet, the uniqueness, newness, and novelty of wearables, as well as the fast-paced evolution in the arena of the consumer's computing ecosystem, make the case of adequate coverage of the background and theory. In general, neither technology nor a useful consumer software application exists in a vacuum or silo. A useful consumer application typically needs to factor in and leverage the overall ecosystem for its user facing functionality as well as its system-level architecture. This book progressively covers the history, core concepts, and background on wearable computing-as a foundation for understanding the unique aspects of wearable application design and development. It covers many recent developments in the overall ecosystem of personal computing, cloud-based computing, and intelligent personal assistant-based technologies, as these have some direct or indirect relevance for designing and developing wearable applications.
This book covers the Android Wear and Google Fit platforms in the Google ecosystem and includes the setting up of a suitable development environment and getting connected to hardware devices in order to write your first applications targeted for these platforms. This book is based on and covers the latest version of the Android platforms at the time of writing, namely, Android 5 (Lollipop).
This book provides a brief coverage of the Android SDK and the new Android 5 build system, which is based on Android Studio 1.0 IDE and Gradle. Android Studio is derived from the leading IntelliJ IDEA® IDE from JetBrains®. Android Studio is available at the Android developer website: https://developer.android.com/sdk. Gradle is a cross-platform project build tool in the same vein as Ant or Maven-which are tools that developers typically use for building software projects.
What This Book Does Not Cover
This book does not attempt to provide any comparative analysis of wearable offerings from outside of the Android and Google ecosystem; nor does it cover or acknowledge the existence of such competing offerings-this is by no means a reflection on the merits of other platforms and their offerings.
This book does not cover Google GlassT, which is a head-mounted display developed by Google and available to consumers since 2014 under an "explorer" program. Google Glass is a "wearable" device and platform that is distinct from the Google Fit and the Android Wear platforms.
The base Android platform SDK is rather elaborate, and this book provides a brief overview and some useful links and resources on basic Android development. While this book has two chapters dedicated to the Android platform and SDK, this book may not adequately serve as an independent, stand-alone reference book on the entire Android platform and SDK.
How This Book Is Structured
This book is sectioned into five parts and has ten chapters.
- Part I provides an introduction to wearable computing including background, history, and theory. It covers diverse topics and concepts some of which potentially influence wearable application and interaction design.
- Part II covers the Android platform from the ground up including its relationships with Linux and Java. It also covers the setting up of Android 5 (Lollipop) development environment using the new Android build system and Android Studio 1.0. It also covers the topics of interdevice communication and device discovery in a multidevice world.
- Part III covers the Android Wear platform and API, as well as the setting up of an Android Wear device for writing Android Wear Apps.
- Part IV covers the Google Fit platform and API, including setting up of a fitness sensor device for writing Google Fit Apps.
- Part V provides a brief overview of some areas of applicability of wearable technology.
Hardware and Software Requirements
The Android SDK and Java SDK (JDK) are available for all the major operating system (OS) platforms. The sample code and Apps developed for this book are OS agnostic. The hands-on steps, labs, and sample code for this book (and for that matter this book in its entirety) were written and developed on Ubuntu-a Linux distribution from Canonical Ltd.
Ubuntu is free, fun to work with, and especially useful for Android development. Android is a Linux-based OS under the covers and therefore shares some OS concepts and equivalent commands with other *nix platforms. Therefore, getting familiar with Linux as your development platform for Android software development is aligned with attaining, in the long run, a deeper understanding of Android. The use of a *nix (Unix family) OS is suggested but is optional. Any Linux distribution or Mac® OS X makes excellent choices for Android App development. For one, you will not need to install an USB driver for each Android device model that you develop and test on-which typically happens to be the case for a MS Windows®-based Android development environment.
The hands-on labs and sample code in this book will be truly useful after acquiring at least an Android Wear/smart watch device and optionally also a Bluetooth low energy (LE) fitness sensor device of your choice. Real hardware devices are essential in order to get a sense of their real-world characteristics and behavior. Wearables are, after all, fundamentally about real-world interactions and behavior. Some software development may be possible using emulators and virtual devices; they can be useful to some...