ebook img

Wearable Android: Android Wear and Google FIT App Development PDF

283 Pages·2015·37.61 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Wearable Android: Android Wear and Google FIT App Development

Wearable android™ Wearable android™ android Wear & Google Fit app development Sanjay M. MiShra Copyright © 2015 by John Wiley & Sons, Inc. All rights reserved Published by John Wiley & Sons, Inc., Hoboken, New Jersey Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per‐copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750‐8400, fax (978) 750‐4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748‐6011, fax (201) 748‐6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762‐2974, outside the United States at (317) 572‐3993 or fax (317) 572‐4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com. Android is a trademark of Google Inc. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Library of Congress Cataloging‐in‐Publication Data: Mishra, Sanjay. Wearable Android™ : Android wear & Google Fit app development / Sanjay M. Mishra. pages cm Includes bibliographical references and index. ISBN 978-1-119-05110-7 (pbk.) 1. Wearable computers. 2. Mobile apps. I. Title. QA76.592.M57 2015 004.167–dc23 2015011300 Cover Image courtesy of iStockphoto © ava09 Set in 10/12pt Times by SPi Global, Pondicherry, India Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 1 2015 Contents About the Author xv About This Book xvii Acknowledgments xxiii Part I Wearable Computing: Introduction and Background 1 1 Wearables: Introduction 3 1.1 Wearable Computing 3 1.2 Wearable Computers and Technology 3 1.3 “Wearables” 4 1.4 The word: “Wearables” 4 1.5 Wearables and Smartphones 5 1.6 Wearable Light, Glanceable Interactions 5 1.7 Smartphone Dependency, Inconveniences 5 1.8 Wearable Interaction 6 1.9 User’s Real‐world Context 6 1.10 Variety of Wearable Devices 6 1.10.1 Smart Watches 6 1.10.2 Fitness Sensors 7 1.10.3 Smart Jewelry 7 vi Contents 1.11 Android Wear and Google Fit 7 1.11.1 Device / Hardware Purchases 7 References and Further Reading 8 2 Wearable Computing Background and Theory 9 2.1 Wearable Computing History 9 2.1.1 Wearable Computing Pioneers 10 2.1.2 Academic Research at Various Universities 11 2.2 Internet of Things (IoT) and Wearables 11 2.2.1 Machine to Machine (M2M) 13 2.3 Wearables’ Mass Market Enablers 13 2.3.1 “ARM‐ed” revolution 14 2.3.1.1 ARM alternatives 14 2.3.2 System on Chip (SoC) 14 2.3.3 Human Dependence on Computing 15 2.3.4 Smartphone extensions 15 2.3.5 Sensors 15 2.3.5.1 Micro‐Electro‐Mechanical Systems (MEMS) Sensors 16 2.4 Human–Computer Interface and Human–Computer Relationship 16 2.4.1 Human–Computer Interface: over the years 16 2.4.2 Human Computer Interaction (HCI): Demand and Suggest 17 2.4.2.1 Demand Paradigm 17 2.4.2.2 Suggest Paradigm 18 2.4.2.3 Demand or Suggest? 18 2.4.2.4 Demand and Suggest: A Healthy Balance 18 2.4.3 Evolution of the Human–Computer Relationship 18 2.5 A Multi‐Device World 19 2.5.1 Spatial Scope of Computing: Devices near and Devices far 19 2.5.2 Body Area Network (BAN) 19 2.5.3 Personal Area Network (PAN) 20 2.5.4 Home Area Network (HAN) 21 2.5.5 Automobile Network 21 2.5.5.1 Controller Area Network (CAN) 21 2.5.6 Near‐Me Area Network (NAN) 21 2.5.7 Campus Area Network 22 2.5.8 Metro Area Network 22 2.5.9 Wide Area Network 22 2.5.10 Internet 22 2.5.11 Interplanetary Network 23 2.6 Ubiquitous Computing 23 2.7 Collective, Synergistic Computing Value 23 2.7.1 Importance of the User Centricity and the User Context 23 2.7.2 Distributed Intelligent Personal Assistant 24 2.8 Bright and Cloudy: Cloud‐based Intelligent Personal Agent 24 2.8.1 Google / Cloud‐Based Intelligent Personal Agent 24 Contents vii 2.9 Leveraging Computer Vision 25 2.9.1 Enhanced Computer Vision / Subtle Change Amplification 25 2.10 IoT and Wearables: Unnatural and over the top? 26 2.10.1 Human History of Tool Use and Computation 27 2.10.2 Communication Networks in Nature 27 2.10.3 Consumption of Power: by computational systems, biological and artificial 28 2.11 Security and Privacy Issues 28 2.11.1 Use Awareness and complete end‐to‐end Transparency 29 2.11.2 User Control and Choice 30 2.11.3 User Access to Collected Data and Erasure capability 30 2.11.4 Device side, transit, and cloud side protection: Data Anonymization 30 2.11.5 Practical Considerations: User Centricity 30 2.11.5.1 OpenID 31 2.12 Miscellaneous 31 2.12.1 PhoneBloks: Waste Reduction 31 2.12.1.1 Project “Ara” 31 2.12.2 Google Cardboard: inexpensive Virtual Reality 32 References and Further Reading 32 Part II Foundation Android 35 3 Android Fundamentals / Hello Lollipop 37 3.1 Android: Introduction 37 3.2 Linux: “*nix” or Unix‐like OS 38 3.2.1 Unix 38 3.2.2 Open Source 39 3.2.3 GNU / Free Software Foundation 39 3.2.3.1 Free as in Freedom: GNU Public License 40 3.2.4 Apache Software Foundation: Apache Software License 41 3.3 Linux: yesterday and today 41 3.4 Unix System Architecture 41 3.4.1 Unix Processes 42 3.4.1.1 Linux Processes 42 3.4.1.2 Android Processes 42 3.4.1.3 Process Tree 42 3.4.1.4 Unix Interprocess Communication (IPC) 43 3.4.1.5 Remote Procedure Calls (RPC) 44 3.4.2 Unix Kernel 44 3.4.2.1 Linux Kernel 44 3.5 Java 44 3.5.1 Java Origins 45 3.5.2 Java Platform: Language, JVM 45 viii Contents 3.5.3 Java memory: Heap, Stack, and native 45 3.5.4 Security Policy: Permissions 46 3.6 Apache Harmony 46 3.7 Android OS and platform 47 3.7.1 Android Kernel 47 3.7.2 Android Open Source Project (AOSP) 50 3.7.2.1 Android Framework 50 3.7.3 Android Development 50 3.7.3.1 Android SDK 51 3.7.3.2 Android NDK 51 3.7.4 Android Runtime Environment 51 3.7.4.1 Dalvik Virtual Machine 52 3.7.4.2 ART (Android Runtime) 52 3.7.4.3 Zygote 52 3.7.4.4 System Server: Android System Services 53 3.7.5 Android Interface Definition Language (AIDL) 53 3.8 Setting up your Android Development Environment 54 3.8.1 Installing Java SDK version 7 (JDK 1.7) from Sun Microsystems / Oracle 54 3.8.2 Installing Android SDK from Google 56 3.8.3 Installing Build Tools (gradle and ant) 63 3.8.4 Setting up environment variables (Java, Android SDK, gradle and ant) 63 3.8.5 Android (Lollipop) Development Device setup 64 3.8.5.1 Creating a new Android project (classic / ant) 65 3.8.5.2 Creating a new Android project (new / gradle) 71 3.8.6 Installing Android Studio “IDE” 72 3.8.7 Android Studio: Hello World App 76 3.8.8 Configuring Android Studio 81 3.9 Android “Classic” project tree and build system 82 3.10 Android “New” Build System 82 3.11 Managing Java Installations 83 3.11.1 Avoid sudo apt‐get / rpm style installation 83 3.11.2 Maintain discrete Java JDK versions 83 3.11.3 Set JAVA_HOME in your .profile 84 3.11.4 Project‐wise JAVA_HOME 84 3.11.5 IDE independent build 84 3.12 Managing Android SDK installation and updates 84 3.12.1 Update your Android SDK often 84 3.12.2 Target your App to the latest SDK / API level 85 3.12.3 Be sure to specify a minimum SDK / API level for your App 85 3.13 Code Samples: Android Lollipop 85 References and Further Reading 85

Description:
Software Development/Mobile/Android/Wearable/Fitness Build "Wearable" Applications on the Android Wear and Google Fit Platforms This book covers wearable computing and wearable application development particularly for Android Wear (smartwatches) and Google Fit (fitness sensors). It provides relevant
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.