About the Author |
|
xv | |
About This Book |
|
xvii | |
Acknowledgments |
|
xxiii | |
Part I Wearable Computing: Introduction and Background |
|
1 | (34) |
|
1 Wearables: Introduction |
|
|
3 | (6) |
|
|
3 | (1) |
|
1.2 Wearable Computers and Technology |
|
|
3 | (1) |
|
|
4 | (1) |
|
1.4 The word: "Wearables" |
|
|
4 | (1) |
|
1.5 Wearables and Smartphones |
|
|
5 | (1) |
|
1.6 Wearable Light, Glanceable Interactions |
|
|
5 | (1) |
|
1.7 Smartphone Dependency, Inconveniences |
|
|
5 | (1) |
|
|
6 | (1) |
|
1.9 User's Real-world Context |
|
|
6 | (1) |
|
1.10 Variety of Wearable Devices |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
1.11 Android Wear and Google Fit |
|
|
7 | (1) |
|
1.11.1 Device/Hardware Purchases |
|
|
7 | (1) |
|
References and Further Reading |
|
|
8 | (1) |
|
2 Wearable Computing Background and Theory |
|
|
9 | (26) |
|
2.1 Wearable Computing History |
|
|
9 | (2) |
|
2.1.1 Wearable Computing Pioneers |
|
|
10 | (1) |
|
2.1.2 Academic Research at Various Universities |
|
|
11 | (1) |
|
2.2 Internet of Things (IoT) and Wearables |
|
|
11 | (2) |
|
2.2.1 Machine to Machine (M2M) |
|
|
13 | (1) |
|
2.3 Wearables' Mass Market Enablers |
|
|
13 | (3) |
|
2.3.1 "ARM-ed" revolution |
|
|
14 | (1) |
|
|
14 | (1) |
|
2.3.2 System on Chip (SoC) |
|
|
14 | (1) |
|
2.3.3 Human Dependence on Computing |
|
|
15 | (1) |
|
2.3.4 Smartphone extensions |
|
|
15 | (1) |
|
|
15 | (1) |
|
2.3.5.1 Micro-Electro-Mechanical Systems (MEMS) Sensors |
|
|
16 | (1) |
|
2.4 Human-Computer Interface and Human-Computer Relationship |
|
|
16 | (3) |
|
2.4.1 Human-Computer Interface: over the years |
|
|
16 | (1) |
|
2.4.2 Human Computer Interaction (HCI): Demand and Suggest |
|
|
17 | (1) |
|
|
17 | (1) |
|
|
18 | (1) |
|
2.4.2.3 Demand or Suggest? |
|
|
18 | (1) |
|
2.4.2.4 Demand and Suggest: A Healthy Balance |
|
|
18 | (1) |
|
2.4.3 Evolution of the Human-Computer Relationship |
|
|
18 | (1) |
|
|
19 | (4) |
|
2.5.1 Spatial Scope of Computing: Devices near and Devices far |
|
|
19 | (1) |
|
2.5.2 Body Area Network (BAN) |
|
|
19 | (1) |
|
2.5.3 Personal Area Network (PAN) |
|
|
20 | (1) |
|
2.5.4 Home Area Network (HAN) |
|
|
21 | (1) |
|
|
21 | (1) |
|
2.5.5.1 Controller Area Network (CAN) |
|
|
21 | (1) |
|
2.5.6 Near-Me Area Network (NAN) |
|
|
21 | (1) |
|
2.5.7 Campus Area Network |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
2.5.11 Interplanetary Network |
|
|
23 | (1) |
|
|
23 | (1) |
|
2.7 Collective, Synergistic Computing Value |
|
|
23 | (1) |
|
2.7.1 Importance of the User Centricity and the User Context |
|
|
23 | (1) |
|
2.7.2 Distributed Intelligent Personal Assistant |
|
|
24 | (1) |
|
2.8 Bright and Cloudy: Cloud-based Intelligent Personal Agent |
|
|
24 | (1) |
|
2.8.1 Google/Cloud-Based Intelligent Personal Agent |
|
|
24 | (1) |
|
2.9 Leveraging Computer Vision |
|
|
25 | (1) |
|
2.9.1 Enhanced Computer Vision/Subtle Change Amplification |
|
|
25 | (1) |
|
2.10 IoT and Wearables: Unnatural and over the top? |
|
|
26 | (2) |
|
2.10.1 Human History of Tool Use and Computation |
|
|
27 | (1) |
|
2.10.2 Communication Networks in Nature |
|
|
27 | (1) |
|
2.10.3 Consumption of Power: by computational systems, biological and artificial |
|
|
28 | (1) |
|
2.11 Security and Privacy Issues |
|
|
28 | (3) |
|
2.11.1 Use Awareness and complete end-to-end Transparency |
|
|
29 | (1) |
|
2.11.2 User Control and Choice |
|
|
30 | (1) |
|
2.11.3 User Access to Collected Data and Erasure capability |
|
|
30 | (1) |
|
2.11.4 Device side, transit, and cloud side protection: Data Anonymization |
|
|
30 | (1) |
|
2.11.5 Practical Considerations: User Centricity |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
31 | (1) |
|
2.12.1 PhoneBloks: Waste Reduction |
|
|
31 | (1) |
|
|
31 | (1) |
|
2.12.2 Google Cardboard: inexpensive Virtual Reality |
|
|
32 | (1) |
|
References and Further Reading |
|
|
32 | (3) |
Part II Foundation Android |
|
35 | (84) |
|
3 Android Fundamentals/Hello Lollipop |
|
|
37 | (50) |
|
3.1 Android: Introduction |
|
|
37 | (1) |
|
3.2 Linux: "*nix" or Unix-like OS |
|
|
38 | (3) |
|
|
38 | (1) |
|
|
39 | (1) |
|
3.2.3 GNU/Free Software Foundation |
|
|
39 | (2) |
|
3.2.3.1 Free as in Freedom: GNU Public License |
|
|
40 | (1) |
|
3.2.4 Apache Software Foundation: Apache Software License |
|
|
41 | (1) |
|
3.3 Linux: yesterday and today |
|
|
41 | (1) |
|
3.4 Unix System Architecture |
|
|
41 | (3) |
|
|
42 | (2) |
|
|
42 | (1) |
|
3.4.1.2 Android Processes |
|
|
42 | (1) |
|
|
42 | (1) |
|
3.4.1.4 Unix Interprocess Communication (IPC) |
|
|
43 | (1) |
|
3.4.1.5 Remote Procedure Calls (RPC) |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
45 | (1) |
|
3.5.2 Java Platform: Language, JVM |
|
|
45 | (1) |
|
3.5.3 Java memory: Heap, Stack, and native |
|
|
45 | (1) |
|
3.5.4 Security Policy: Permissions |
|
|
46 | (1) |
|
|
46 | (1) |
|
3.7 Android OS and platform |
|
|
47 | (7) |
|
|
47 | (3) |
|
3.7.2 Android Open Source Project (AOSP) |
|
|
50 | (1) |
|
3.7.2.1 Android Framework |
|
|
50 | (1) |
|
3.7.3 Android Development |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
51 | (1) |
|
3.7.4 Android Runtime Environment |
|
|
51 | (2) |
|
3.7.4.1 Dalvik Virtual Machine |
|
|
52 | (1) |
|
3.7.4.2 ART (Android Runtime) |
|
|
52 | (1) |
|
|
52 | (1) |
|
3.7.4.4 System Server: Android System Services |
|
|
53 | (1) |
|
3.7.5 Android Interface Definition Language (AIDL) |
|
|
53 | (1) |
|
3.8 Setting up your Android Development Environment |
|
|
54 | (28) |
|
3.8.1 Installing Java SDK version 7 (JDK 1.7) from Sun Microsystems/Oracle |
|
|
54 | (2) |
|
3.8.2 Installing Android SDK from Google |
|
|
56 | (7) |
|
3.8.3 Installing Build Tools (gradle and ant) |
|
|
63 | (1) |
|
3.8.4 Setting up environment variables (Java, Android SDK, gradle and ant) |
|
|
63 | (1) |
|
3.8.5 Android (Lollipop) Development Device setup |
|
|
64 | (8) |
|
3.8.5.1 Creating a new Android project (classic/ant) |
|
|
65 | (6) |
|
3.8.5.2 Creating a new Android project (new/gradle) |
|
|
71 | (1) |
|
3.8.6 Installing Android Studio "IDE" |
|
|
72 | (4) |
|
3.8.7 Android Studio: Hello World App |
|
|
76 | (5) |
|
3.8.8 Configuring Android Studio |
|
|
81 | (1) |
|
3.9 Android "Classic" project tree and build system |
|
|
82 | (1) |
|
3.10 Android "New" Build System |
|
|
82 | (1) |
|
3.11 Managing Java Installations |
|
|
83 | (1) |
|
3.11.1 Avoid sudo apt-get/rpm style installation |
|
|
83 | (1) |
|
3.11.2 Maintain discrete Java JDK versions |
|
|
83 | (1) |
|
3.11.3 Set JAVA_HOME in your .profile |
|
|
84 | (1) |
|
3.11.4 Project-wise JAVA_HOME |
|
|
84 | (1) |
|
3.11.5 IDE independent build |
|
|
84 | (1) |
|
3.12 Managing Android SDK installation and updates |
|
|
84 | (1) |
|
3.12.1 Update your Android SDK often |
|
|
84 | (1) |
|
3.12.2 Target your App to the latest SDK/API level |
|
|
85 | (1) |
|
3.12.3 Be sure to specify a minimum SDK/API level for your App |
|
|
85 | (1) |
|
3.13 Code Samples: Android Lollipop |
|
|
85 | (1) |
|
References and Further Reading |
|
|
85 | (2) |
|
|
87 | (24) |
|
4.1 Software Components, in general |
|
|
87 | (1) |
|
4.2 Android Application Development Model |
|
|
88 | (3) |
|
|
88 | (1) |
|
|
88 | (2) |
|
4.2.3 Android Project Build Process |
|
|
90 | (1) |
|
4.2.4 APK installation and execution |
|
|
90 | (1) |
|
4.2.4.1 Application main thread/UI thread |
|
|
91 | (1) |
|
|
91 | (2) |
|
4.3.1 Android Application Manifest (AndroidManifestxml) |
|
|
92 | (1) |
|
4.3.2 Android API package Overview |
|
|
92 | (1) |
|
4.4 Android's Four Fundamental Components |
|
|
93 | (1) |
|
4.4.1 Android Project Artifacts |
|
|
94 | (1) |
|
|
94 | (4) |
|
4.5.1 Activity life cycle |
|
|
96 | (2) |
|
|
98 | (2) |
|
|
100 | (1) |
|
|
100 | (1) |
|
|
101 | (6) |
|
4.9.1 Intent Action and Data |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
106 | (6) |
|
4.9.6.1 Starting Activities |
|
|
106 | (1) |
|
4.9.6.2 Starting Services |
|
|
106 | (1) |
|
4.9.6.3 Delivering Broadcasts |
|
|
106 | (1) |
|
4.10 android package, sub-packages |
|
|
107 | (1) |
|
4.11 dalvik package, sub-packages |
|
|
107 | (1) |
|
4.12 Java and javax package, sub-packages |
|
|
108 | (1) |
|
4.13 org package, sub-packages |
|
|
108 | (1) |
|
4.14 Sample code in this book |
|
|
109 | (1) |
|
References and Further Reading |
|
|
109 | (2) |
|
5 Android Device Discovery and Communication |
|
|
111 | (8) |
|
5.1 Android Interconnectivity |
|
|
111 | (1) |
|
5.2 Advertisement and Discovery |
|
|
112 | (1) |
|
|
112 | (1) |
|
5.3.1 Bluetooth Low Energy (LE) |
|
|
112 | (1) |
|
5.3.2 Bluetooth Generic Attribute Profiles (GATT) |
|
|
112 | (1) |
|
5.3.3 Android support for Bluetooth LE |
|
|
113 | (1) |
|
5.4 Wi-Fi Peer-to-Peer (Wi-Fi Direct) |
|
|
113 | (1) |
|
5.4.1 Android Wi-Fi Direct/P2P API |
|
|
114 | (1) |
|
5.5 Zero Configuration Networking (zeroconf) |
|
|
114 | (1) |
|
5.5.1 Android Network Service Discovery (NSD) |
|
|
115 | (1) |
|
5.6 Near Field Communication (NFC) |
|
|
115 | (1) |
|
5.7 Universal Serial Bus (USB) |
|
|
116 | (1) |
|
5.7.1 USB On-The-Go (USB OTG) |
|
|
116 | (1) |
|
References and Further Reading |
|
|
116 | (3) |
Part III Android Wear Platform and SDK |
|
119 | (70) |
|
|
121 | (48) |
|
|
121 | (1) |
|
6.2 Android Wear Platform: Android Wear OS, Wear Devices, and Wear API |
|
|
122 | (1) |
|
|
122 | (1) |
|
6.2.2 Android Wear Devices |
|
|
122 | (1) |
|
6.2.3 Android Wear API and Wear Apps |
|
|
123 | (1) |
|
6.3 Android Notifications and Android Wear |
|
|
123 | (3) |
|
6.3.1 Android 5.0 (Lollipop) Notifications |
|
|
124 | (2) |
|
6.4 Notification Settings and Control |
|
|
126 | (10) |
|
6.4.1 Sound and Notification and Priority Notification |
|
|
126 | (3) |
|
6.4.2 Notification Configuration and Control |
|
|
129 | (2) |
|
6.4.3 Locked Screen and Notifications |
|
|
131 | (4) |
|
6.4.3.1 Notification Access |
|
|
134 | (1) |
|
|
135 | (1) |
|
6.5 App Notification Strategy |
|
|
136 | (1) |
|
6.6 Google Now and Android Wear |
|
|
137 | (1) |
|
6.7 Android Wear Devices: Getting Started |
|
|
138 | (17) |
|
6.7.1 Android SDK Wear Platform updates |
|
|
138 | (1) |
|
6.7.2 Procuring an Android Wear device |
|
|
139 | (6) |
|
6.7.2.1 Using Android Emulator with Wear AVD |
|
|
140 | (5) |
|
6.7.3 Pairing and Enabling Developer Mode |
|
|
145 | (10) |
|
6.7.3.1 Unboxing your Wear device |
|
|
145 | (1) |
|
6.7.3.2 Pairing your Handheld device with your Wear device |
|
|
145 | (5) |
|
6.7.3.3 Enabling Developer Mode and Debugging Settings on your Wear device |
|
|
150 | (3) |
|
6.7.3.4 Enabling Wear ADB Debugging and Debug over Bluetooth |
|
|
153 | (2) |
|
6.8 Wear Debugging and Android SDK |
|
|
155 | (6) |
|
6.8.1 Wear Debugging via USB |
|
|
155 | (3) |
|
6.8.2 Wear Debugging via Bluetooth |
|
|
158 | (3) |
|
6.9 Peeking under the hood of your Wear Device |
|
|
161 | (2) |
|
6.10 Engaging your Android Wear device via Notifications |
|
|
163 | (2) |
|
6.10.1 Engaging Android Wear via Notification Sync |
|
|
163 | (1) |
|
6.10.2 Wear Extended Notifications |
|
|
163 | (2) |
|
6.11 Android Wear Targeted Apps |
|
|
165 | (1) |
|
6.12 Hello Wear World: Writing our first Wear App |
|
|
165 | (3) |
|
References and Further Reading |
|
|
168 | (1) |
|
|
169 | (20) |
|
7.1 Google Services and Google Play Services |
|
|
169 | (4) |
|
7.1.1 GoogleApiClient class |
|
|
171 | (2) |
|
|
173 | (1) |
|
7.3 Android Wear API, in depth |
|
|
173 | (5) |
|
7.3.1 Wear API: wearable package |
|
|
174 | (2) |
|
|
174 | (1) |
|
7.3.1.2 WearableListenerService |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
177 | (1) |
|
|
177 | (1) |
|
7.4 DataItem, DataMapltem, and DataMap |
|
|
178 | (2) |
|
|
178 | (2) |
|
|
180 | (1) |
|
|
180 | (1) |
|
7.5 PutDataRequest and PutDataMapRequest |
|
|
180 | (2) |
|
|
180 | (1) |
|
|
180 | (2) |
|
7.6 Asset and DataItemAsset |
|
|
182 | (1) |
|
|
182 | (1) |
|
7.6.2 DataltemAsset interface |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
7.9 Wear Interaction Design |
|
|
185 | (1) |
|
|
186 | (1) |
|
7.11 Production Wear Apps |
|
|
187 | (1) |
|
References and Further Reading |
|
|
187 | (2) |
Part IV Google Fit Platform and SDK |
|
189 | (56) |
|
|
191 | (22) |
|
8.1 Google Fit Platform Overview |
|
|
191 | (1) |
|
8.2 Google Fit Core Concepts |
|
|
192 | (1) |
|
|
192 | (1) |
|
8.4 Fit Data Store (Storage) |
|
|
193 | (1) |
|
|
193 | (1) |
|
8.6 Permissions, User Consent |
|
|
194 | (1) |
|
8.6.1 Permission Groups, Fitness Scopes |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
194 | (1) |
|
8.7 Google Fit: Developer Responsibilities |
|
|
195 | (1) |
|
8.7.1 Developer Terms and Conditions |
|
|
195 | (1) |
|
8.7.2 Developer Branding Guidelines |
|
|
195 | (1) |
|
8.8 Procuring Sensor Peripherals |
|
|
195 | (1) |
|
8.9 Hello Fit: hands-on example |
|
|
195 | (16) |
|
8.9.1 Google Play Services library project, dependency |
|
|
196 | (2) |
|
8.9.2 Using the SHA1 fingerprint of the keystore |
|
|
198 | (2) |
|
8.9.3 Google Developer's Console Activating Fit API |
|
|
200 | (2) |
|
8.9.4 Creating the Android App |
|
|
202 | (9) |
|
|
211 | (1) |
|
|
211 | (1) |
|
References and Further Reading |
|
|
212 | (1) |
|
|
213 | (32) |
|
|
213 | (1) |
|
9.2 Google fit main package (com.google.android.gms.fitness) |
|
|
213 | (10) |
|
|
214 | (2) |
|
9.2.2 FitnessActivities class |
|
|
216 | (1) |
|
9.2.3 FitnessStatusCodes class |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
223 | (8) |
|
|
223 | (1) |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
225 | (1) |
|
|
225 | (2) |
|
|
227 | (1) |
|
|
228 | (1) |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
230 | (1) |
|
|
231 | (5) |
|
9.4.1 StartBleScanRequest |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
9.4.5 OnDataPointListener |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
9.4.8 SessionlnsertRequest |
|
|
236 | (1) |
|
|
236 | (1) |
|
9.4.10 DataTypeCreateRequest |
|
|
236 | (1) |
|
|
236 | (4) |
|
|
237 | (1) |
|
|
238 | (1) |
|
9.5.3 ListSubscriptionsResult |
|
|
238 | (1) |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
239 | (1) |
|
|
239 | (1) |
|
|
240 | (3) |
|
9.6.1 FitnessSensorService |
|
|
242 | (1) |
|
9.6.2 FitnessSensorServiceRequest |
|
|
242 | (1) |
|
9.6.3 SensorEventDispatcher interface |
|
|
243 | (1) |
|
References and Further Reading |
|
|
243 | (2) |
Part V Real-World Applications |
|
245 | (6) |
|
10 Real-World Applications |
|
|
247 | (4) |
|
10.1 Real-World Applications |
|
|
247 | (1) |
|
10.2 Handheld Application Extension |
|
|
247 | (1) |
|
|
247 | (1) |
|
10.3.1 Home Entertainment |
|
|
248 | (1) |
|
|
248 | (1) |
|
10.4 Wearables at the Workplace |
|
|
248 | (1) |
|
10.5 Fitness, Health, and Medical |
|
|
248 | (2) |
|
10.5.1 Predictive and Proactive Consumer Health |
|
|
249 | (1) |
|
10.5.2 Wearables for Medical Professionals |
|
|
249 | (1) |
|
10.5.3 Wearables and Remote Medical Diagnostics |
|
|
249 | (1) |
|
10.6 Industrial Manufacturing |
|
|
250 | (1) |
|
10.7 Civic, Government, and Democracy |
|
|
250 | (1) |
|
References and Further Reading |
|
|
250 | (1) |
Index |
|
251 | |