Book Image

Android Wearable Programming

By : Steven F. Daniel
Book Image

Android Wearable Programming

By: Steven F. Daniel

Overview of this book

Table of Contents (14 chapters)
Android Wearable Programming
Credits
About the Authors
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. Sending and Syncing Data

This chapter will provide you with the background and understanding of how you can effectively build applications that communicate between the Android handheld device and the Android wearable, send messages and compressed blob image data over Bluetooth to the Android wearable device, and then present this information within the wearable watch face area.

Android Wear comes with a number of APIs that will help to make communicating between the handheld and the wearable a breeze. We will be learning the differences between using MessageAPI, which is sometimes referred to as a "fire and forget" type of message, and DataLayerAPI that supports syncing of data between a handheld and a wearable, and NodeAPI that handles events related to each of the local and connected device nodes.

We will learn how to use DataLayerAPI to send an image from our handheld device to the wearable device, and then use MessageAPI, which will enable us to send and receive messages between...