com.google.android.gms.wearable.CapabilityApi |
Exposes an API to learn about capabilities provided by nodes on the Wear network.
Capabilities are local to an application.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CapabilityApi.AddLocalCapabilityResult |
Result returned from addLocalCapability(GoogleApiClient, String)
|
||||||||||
CapabilityApi.CapabilityListener | Listener for changes in the reachable nodes providing a capability. | ||||||||||
CapabilityApi.GetAllCapabilitiesResult |
Result returned from getAllCapabilities(GoogleApiClient, int)
|
||||||||||
CapabilityApi.GetCapabilityResult |
Result returned from getCapability(GoogleApiClient, String, int)
|
||||||||||
CapabilityApi.RemoveLocalCapabilityResult |
Result returned from removeLocalCapability(GoogleApiClient, String)
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FILTER_ALL |
Filter type for
getCapability(GoogleApiClient, String, int) ,
getAllCapabilities(GoogleApiClient, int) :
If this filter is set then the full set of nodes that declare the given capability will
be included in the capability's CapabilityInfo .
|
|||||||||
int | FILTER_REACHABLE |
Filter type for
getCapability(GoogleApiClient, String, int) ,
getAllCapabilities(GoogleApiClient, int) :
If this filter is set then only reachable nodes that declare the given capability will
be included in the capability's CapabilityInfo .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Registers a listener to be notified of capabilities being added to or removed from the Wear
network.
| |||||||||||
Announces that a capability has become available on the local node.
| |||||||||||
Returns information about all capabilities, including the nodes that declare
those capabilities.
| |||||||||||
Returns information about a capability, including the nodes that declare that capability.
| |||||||||||
Removes a listener which was previously added through
addCapabilityListener(GoogleApiClient, CapabilityApi.CapabilityListener, String) .
| |||||||||||
Announces that a capability is no longer available on the local node.
|
Filter type for
getCapability(GoogleApiClient, String, int)
,
getAllCapabilities(GoogleApiClient, int)
:
If this filter is set then the full set of nodes that declare the given capability will
be included in the capability's CapabilityInfo
.
Filter type for
getCapability(GoogleApiClient, String, int)
,
getAllCapabilities(GoogleApiClient, int)
:
If this filter is set then only reachable nodes that declare the given capability will
be included in the capability's CapabilityInfo
.
Registers a listener to be notified of capabilities being added to or removed from the Wear
network.
Calls to this method should be balanced with removeCapabilityListener(GoogleApiClient, CapabilityApi.CapabilityListener, String)
to avoid
leaking resources.
Callers wishing to be notified of events in the background should use
WearableListenerService
.
Announces that a capability has become available on the local node.
Returns information about all capabilities, including the nodes that declare
those capabilities. The filter parameter controls whether all nodes are returned,
FILTER_ALL
, or only those that are currently reachable by this node,
FILTER_REACHABLE
.
The local node will never be returned in the set of nodes.
Returns information about a capability, including the nodes that declare that capability.
The filter parameter controls whether all nodes are returned, FILTER_ALL
, or
only those that are currently reachable by this node, FILTER_REACHABLE
.
The local node will never be returned in the set of nodes.
Removes a listener which was previously added through addCapabilityListener(GoogleApiClient, CapabilityApi.CapabilityListener, String)
.
The listener is only removed from listening for the capability provided and will
continue to receive messages for any other capabilities it was previously registered for
that have not also been removed.
Announces that a capability is no longer available on the local node. Note: this will not remove any capabilities announced in the Manifest for an app.