O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Android Wearable Programming

Book Description

Expand on your Android development capabilities by building applications for Android Wear

In Detail

This book will introduce you to the very popular Android Wear platform with hands-on instructions for building Android Wear applications. You will start with an introduction to the architecture of Android, followed by an in-depth look at the design of Android applications and user interfaces using Android Studio. You will see how to create basic and custom notifications for your apps, and synchronize data from the wearable device with the handheld mobile device. More advanced topics such as intents, the Gradle build configuration and the implementation of build variants, and packaging and deploying from a single project code base are also covered.

By the end of this book, you will have a good understanding of wearable programming, and be confident enough to write programs for building Android applications that run on Android Wear.

What You Will Learn

  • Get introduced to the Android Wear and Google Glass SDK
  • Create your own basic and custom notifications for Android Wear by using Android notifications
  • Develop custom Android wearable watch faces and debug them over Bluetooth prior to packaging
  • Deploy your application to the handheld device or the Google Play Store
  • Develop apps that have the ability to send and receive binary blobs of data from the handheld device to the wearable device
  • Create custom layouts for the Android TV platform conforming to the Android TV design principles
  • Build effective user interfaces for the Google Glass platform
  • Incorporate voice and input features into your Android wearable app

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Android Wearable Programming
    1. Table of Contents
    2. Android Wearable Programming
    3. Credits
    4. About the Authors
    5. Acknowledgments
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Understanding Android Wearables and Building Your First Android Wear App
      1. Introducing Android wearables
      2. Understanding the Android Wear architecture
      3. Setting up an Android development environment
        1. Installing the Android Wear support library
        2. Setting up and configuring the Android (AVD) Emulator
      4. Building a simple Android wearable application
        1. Creating the mobile activity component
        2. Creating the Android Wear activity component
      5. Summary
    10. 2. Creating Notifications
      1. Introducing Android notifications
      2. Creating a basic notification for wearables
        1. Specifying the form factors
        2. Adding and customizing a blank activity
        3. Adding dependencies to Gradle scripts
      3. Creating a custom notification for wearables
      4. Receiving voice input within a notification
      5. Receiving multiple notifications through a process called page stacking
      6. Summary
    11. 3. Creating, Debugging, and Packaging Wearable Apps
      1. Creating an Android wearable watch face app
      2. Presenting information inside the WatchFace class
      3. Creating a custom watch face service class
      4. Debug your Android wearable app over Bluetooth
      5. Running apps directly on an Android Wear device
      6. The Android wearable user interface guidelines
      7. Packaging your Android wearable application
      8. Summary
    12. 4. Sending and Syncing Data
      1. Creating a wearable send and receive application
      2. Creating a UI for the mobile activity
      3. Creating a UI for the wear activity
      4. Establishing connections for the mobile activity
      5. Sending messages to the Android wearable
      6. Receiving messages using MessageAPI
      7. Transferring image data to the Android wearable
      8. Receiving image data using DataApi
      9. Summary
    13. 5. Working with Google Glass
      1. Installing the Glass Development Kit preview
      2. Installing the Google USB drivers for Windows
      3. Creating and building a Google Glass application
        1. Setting the theme for the Google Glass app
        2. Configuring the project to run on Google Glass
        3. Creating the custom menu resource file
        4. Configuring the AndroidManifests file
        5. Creating the custom camera layout resource file
        6. Incorporating a voice input within Google Glass
        7. Accessing camera through Google Glass
        8. Incorporating the Google Maps API with Google Glass
        9. Modifying the Google Glass main activity UI
      4. Launching the app within Google Glass
      5. An introduction to GDK and the Google Mirror API
        1. The Mirror API playground
      6. The Google Glassware principle design guidelines
      7. Summary
    14. 6. Designing and Customizing Interfaces for Android TV
      1. Creating and building an Android TV application
      2. Customizing the Android TV user interface
        1. Creating the CustomHeadersFragment class
        2. Creating the CustomRowsFragment class
        3. Creating the CustomFrameLayout class
        4. Creating the SearchActivity class
        5. Creating the SearchFragment class
        6. Creating the custom activity layout resource file
      3. The Android TV user interface design guidelines
      4. Summary
    15. Index