Android Wear data types and interfaces for sending and synchronizing data overview

Source: Internet
Author: User

The Android wear Data Layer API is part of the Google Play service, a communication channel for your handheld devices and wearable applications. The API includes a series of data objects that allow the system to notify the app data layer of important events through listeners and lines.

The following are several object types.

Data Item

Provides data storage for automatic synchronization of mobile phones and wear.

Messages

The Messaging API can implement Fire-and-forget mode, such as controlling the handset player control in wear or sending an intent to wear via the phone, which provides the message when a connection is established or a transmission error occurs. The message is a typical one-way transmission of the command pattern.

Asset

This object is used to transmit binary data, like that the object can be converted to be carried in the data item, the system can automatically transfer for you.

Wearablelistenerservice

The implementation of the service can listen to the system data layer time in the service, the system manages the life cycle of the service, when the need to send the data item and the message is bound to the service, and when not needed, unbind.

Datalistener

< Span style= "font-size:18px" > implementation of the interface in the activity can listen to data layer events, when the activity in the active state, using the interface can let you replace wearablelistenerservice uses the app to listen for changes in the data layer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.