Pro Android Wearables Building Apps for Smartwatches Wallace Jackson Pro Android Wearables: Building Apps for Smartwatches Copyright © 2015 by Wallace Jackson This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law. ISBN-13 (pbk): 978-1-4302-6550-4 ISBN-13 (electronic): 978-1-4302-6551-1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director: Welmoed Spahr Lead Editor: Steve Anglin Technical Reviewer: Jeff Tang Editorial Board: Steve Anglin, Louise Corrigan, Jim DeWolf, Jonathan Gennick, Robert Hutchinson, Michelle Lowman, James Markham, Susan McDermott, Matthew Moodie, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Gwenan Spearing, Steve Weiss Coordinating Editor: Mark Powers Copy Editor: Mary Bearden Compositor: SPi Global Indexer: SPi Global Artist: SPi Global Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800- SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail [email protected], or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this text is available to readers at www.apress.com/9781430265504. For additional information about how to locate and download your book’s source code, go to www.apress.com/source-code/. Readers can also access source code at SpringerLink in the Supplementary Material section for each chapter. The Pro Android Wearables book is dedicated to everyone in the open source community who is working diligently to make professional new media application development software and content development tools freely available to rich application developers to utilize to achieve our creative dreams and our financial goals. Last, but not least, I dedicate this book to my father, Parker Jackson, my family, my life-long friends, and all my ranch neighbors, for their constant help, assistance, and those relaxing, late night BBQ parties. Contents at a Glance About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Introduction to Android Wearables: Concepts, Types, and Material Design Chapter 2: Setting Up an Android 5 Wearables Application Development Workstation Chapter 3: A Foundation for Android Wearables: New Wearable Features in Android 5 Chapter 4: Exploring Android Studio: Getting Familiar with the IntelliJ IDEA Chapter 5: Android Virtual Devices: Setting Up Wearables Application Emulators Chapter 6: Introduction to Android Watch Faces Design: Considerations and Concepts Chapter 7: Program Watch Faces for Wear: Creating the Watch Face Code Foundation Chapter 8: A Watch Faces Timing Engine: Using TimeZone, Time, and BroadcastReceiver Chapter 9: Implement a WatchFaces Engine: Core WatchFaces API Methods Chapter 10: WatchFaces Vector Design: Using Vector Graphics for WatchFaces Chapter 11: WatchFaces Bitmap Design: Using Raster Graphics for WatchFaces Chapter 12: WatchFaces Digital Imaging: Developing Multiple Mode Assets Chapter 13: Watch Face Configuration Companion Activity: Google Mobile Services Chapter 14: Watch Face Configuration Companion Activity Utility and Wearable API Chapter 15: Wearables Application Testing: Using Hardware Devices in Android Studio Chapter 16: Wear API Deprecation: Updating Apps to Use New Classes or Methods Chapter 17: The Future of Android IoT APIs: Android TV, Glass, Auto, and Wear Index Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Introduction to Android Wearables: Concepts, Types, and Material Design Wearable Technology Defined: What Is a Wearable? Wearable Application Development: What Types of Apps? Android Wearable Fun: Augmented Reality, Edutainment, and Gamification Mainstream Wearables: Smartwatches and Smartglasses Smartwatches: Round Watch Face vs. Square Organic Light-emitting Diode Smartglasses: Glasses and Other Smartglasses Manufacturers Wearable Application Programming Interfaces Android Studio 1.0: Android Wear SDK Google Glass Development Kit: GDK for Android or Mirror True Android or Android Peripheral: Bluetooth Link Wearable Apps Design: Android 5 Material Design The Android Material Design Themes: Light and Dark Android Material Design View Widgets: Lists and Cards Android Material Design Effects: Shadows and Animation Android Material Design Graphics Processing: Drawables What You Will Learn from This Book Summary Chapter 2: Setting Up an Android 5 Wearables Application Development Workstation Work Process for Creating an Android Workstation Android Development Workstation: Hardware Foundation Android Development Workstation: Software Foundation Java 7: Installing the Foundation for Android Studio Android Studio 1.0: Download the Android 5 IDEA Installing Android Studio: IntelliJ IDEA and Android SDK Professional Digital Imaging Software: GIMP 2.8.14 Professional Digital Video Editing: Lightworks 12 Professional 3D Modeling and Animation: Blender Professional Digital Audio Editing: Audacity 2.0.6 Professional UI Design Wireframing: Pencil Project 2.0.5 Professional Business Software Suite: OpenOffice 4 Other Open Source and Affordable Media Software Summary Chapter 3: A Foundation for Android Wearables: New Wearable Features in Android 5 Android’s Project Volta: Power Management Tools Android 5 Process Scheduler: JobScheduler and JobInfo Android 5 Battery Optimizer: The BatteryHistorian Tool Android’s Network Connection: NFC and Bluetooth Android 5 Multiple Network Support: ConnectivityManager Android 5 Low Energy Bluetooth: The Bluetooth LE API Android 5 NFC Improvements: Near Field Communication Android 5 Media: Adding Wow-Factor to Wearables Digital Video Playback: MediaController and MediaSession Digital Audio Playback: Enhanced AudioTrack Precision Real-Time 3D Rendering: OpenGL ES and Extension Pack WebKit Media: WebView, WebAudio, WebGL, and WebRTC Android MediaBrowser Class: Browsing Third-Party Media Android Camera 2 API: UHD Image Processing Support Android 5 Notifications: LockScreen and MetaData LockScreen Notifications: Privacy Safeguard Control APIs Notification MetaData: Intelligent Notification Classification More Android 5 Operating System Enhancements The Recents Screen: Concurrent Document Support Data Storage: Directory Structure Selection Support Second Screen: Screen Capturing and Screen Sharing Summary Chapter 4: Exploring Android Studio: Getting Familiar with the IntelliJ IDEA Updating IntelliJ IDEA: Using the Update Info Dialog Exploring IntelliJ IDEA: Help, Tips, and Keymaps Configure Android Studio: Using the SDK Manager Run As Administrator: Installing Using Admin Privileges Learning the IntelliJ IDEA Basics: Projects and SDK IntelliJ Project Level: Developing Android Applications IntelliJ Features: SDK, Language Support, and Auto-Coding Creating an Android Wearable App: Using IntelliJ Summary Chapter 5: Android Virtual Devices: Setting Up Wearables Application Emulators Using the AVD Manager: Creating Wear Emulators Using Wear Emulators: Testing Your Wearable App Using IntelliJ Run: Running Wearable Apps in Round Wear Switching AVDs: Running Apps in Round Wear ARM AVD Switching AVDs: Running Apps in Square Wear ARM AVD Summary Chapter 6: Introduction to Android Watch Faces Design: Considerations and Concepts Watch Face Design: Considerations and Guidelines A Watch Faces UI: Seamless Blending of Art and Function
Description: