com.google.android.gms.wearable.NodeApi |
Exposes an API for to learn about local or connected Nodes.
Node events are delivered to all applications on a device.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NodeApi.GetConnectedNodesResult | Contains a list of connected nodes. | ||||||||||
NodeApi.GetLocalNodeResult | Contains the name and id that represents this device. | ||||||||||
NodeApi.NodeListener |
Used with addListener(GoogleApiClient, NodeApi.NodeListener) to receive node events.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Registers a listener to receive all node events.
| |||||||||||
Gets a list of nodes to which this device is currently connected.
| |||||||||||
Gets the
Node that refers to this device.
| |||||||||||
Removes a listener which was previously added through
addListener(GoogleApiClient, NodeListener) .
|
Registers a listener to receive all node events. Calls to this method should balanced
with removeListener(GoogleApiClient, NodeListener)
, to avoid leaking resources.
Callers wishing to be notified of node events in the background should use
WearableListenerService
.
Gets a list of nodes to which this device is currently connected.
The returned list will not include the
local node
.
Gets the Node
that refers to this device. The information in the returned
Node
can be passed to other devices using the MessageApi
, for example.
Removes a listener which was previously added through
addListener(GoogleApiClient, NodeListener)
.