| com.google.android.gms.wearable.MessageApi |
Exposes an API for components to send messages to other nodes.
Messages are delivered to conected network nodes. A message is considered successful if it has been queued for delivery to the specified node. A message will only be queued if the specified node is connected.
Messages should generally contain ephemeral, smaller payloads. Use DataApi to store more
persistent or larger data, efficiently.
A message is private to the application that created it and accessible only by that application on other nodes.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| MessageApi.MessageListener | Used with addListener(GoogleApiClient, MessageApi.MessageListener) to receive message events. |
||||||||||
| MessageApi.SendMessageResult | Contains the request id assigned to the message. | ||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | UNKNOWN_REQUEST_ID | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Registers a listener to receive
MessageEvents. | |||||||||||
Removes a message listener.
| |||||||||||
Sends
byte[] data to the specified node. | |||||||||||
Registers a listener to receive MessageEvents.
Removes a message listener.
Sends byte[] data to the specified node.
| nodeId | identifier for a particular node on the Android Wear network. Valid targets
may be obtained through getConnectedNodes(GoogleApiClient) or from
the host in getUri(). |
|---|---|
| path | identifier used to specify a particular endpoint at the receiving node. |
| data | small array of information to pass to the target node. Generally not larger than 100k. |