The Android wear Data Layer API, which is part of the Google Play service, communicates channels to your handheld devices and wearable applications. API it contains a series of data objects that allow the system to monitor and inform the line app of important event data layers.
Here are several object types.
Data Item
Provides data storage for mobile and wear self-active synchronization.
Messages
The Messaging API can implement Fire-and-forget mode, such as controlling the handset player control in wear or sending an intent on the phone to wear, when a connection is established or a transmission error occurs. will provide the message. The message is a typical one-way transmission of the command pattern.
Asset
This object is used to transfer binary data. Like. The ability to transfer this object to the data item allows the system to proactively transmit it to you.
Wearablelistenerservice
Implement the service to listen to the system data layer time in the service. The system manages the life cycle of the service when it is necessary to send the data item and the message is to bind the service and unbind it when it is not required.
Datalistener
Implement this interface in activity to be able to listen for data-layer events when activities are in active state. Using this interface allows you to replace the Wearablelistenerservice usage app display when it changes the data layer.
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Overview of sending and synchronizing data for Android Wear data types and interfaces