NodeApi
Stay organized with collections
Save and categorize content based on your preferences.
This interface is deprecated.
Use NodeClient
.
Exposes an API for to learn about local or connected Nodes.
Node events are delivered to all applications on a device.
New code should use the CapabilityApi
which allows you to create and listen to application-specific network events.
Public Methods
Gets a list of nodes to which this device is currently connected, either directly or
indirectly via a directly connected node.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-21 UTC."],[[["\u003cp\u003e\u003ccode\u003eSearchAuthApi\u003c/code\u003e provides an interface for Google Search authentication, enabling authorization for using the Now API.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to obtain and clear authorization tokens for interacting with Google Now.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetGoogleNowAuth\u003c/code\u003e retrieves an authorization code or access token for using the Now API, while \u003ccode\u003eclearToken\u003c/code\u003e removes revoked tokens from the cache.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need to integrate \u003ccode\u003eSearchAuthApi\u003c/code\u003e with a \u003ccode\u003eGoogleApiClient\u003c/code\u003e for utilizing its functionalities.\u003c/p\u003e\n"]]],["`NodeApi` is a deprecated interface for discovering local or connected nodes. Developers should use `NodeClient` instead. Key actions include retrieving a list of connected nodes using `getConnectedNodes` and obtaining the local device's node information via `getLocalNode`. Node events are broadcast to all applications. The `CapabilityApi` is recommended for creating application-specific network events. The returned node list does not contain the local node.\n"],null,["# NodeApi\n\npublic interface **NodeApi** \n**This interface is deprecated.** \n\nUse [NodeClient](/android/reference/com/google/android/gms/wearable/NodeClient).\n\nExposes an API for to learn about local or connected Nodes.\n\nNode events are delivered to all applications on a device.\n\nNew code should use the [CapabilityApi](/android/reference/com/google/android/gms/wearable/CapabilityApi)\nwhich allows you to create and listen to application-specific network events. \n\n### Nested Class Summary\n\n|-----------|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| interface | [NodeApi.GetConnectedNodesResult](/android/reference/com/google/android/gms/wearable/NodeApi.GetConnectedNodesResult) || *This interface is deprecated. See [NodeClient.getConnectedNodes()](/android/reference/com/google/android/gms/wearable/NodeClient#getConnectedNodes()).* |\n| interface | [NodeApi.GetLocalNodeResult](/android/reference/com/google/android/gms/wearable/NodeApi.GetLocalNodeResult) || *This interface is deprecated. See [NodeClient.getLocalNode()](/android/reference/com/google/android/gms/wearable/NodeClient#getLocalNode()).* |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[NodeApi.GetConnectedNodesResult](/android/reference/com/google/android/gms/wearable/NodeApi.GetConnectedNodesResult)\\\u003e | [getConnectedNodes](/android/reference/com/google/android/gms/wearable/NodeApi#getConnectedNodes(com.google.android.gms.common.api.GoogleApiClient))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client) Gets a list of nodes to which this device is currently connected, either directly or indirectly via a directly connected node. |\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[NodeApi.GetLocalNodeResult](/android/reference/com/google/android/gms/wearable/NodeApi.GetLocalNodeResult)\\\u003e | [getLocalNode](/android/reference/com/google/android/gms/wearable/NodeApi#getLocalNode(com.google.android.gms.common.api.GoogleApiClient))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client) Gets the [Node](/android/reference/com/google/android/gms/wearable/Node) that refers to this device. |\n\nPublic Methods\n--------------\n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[NodeApi.GetConnectedNodesResult](/android/reference/com/google/android/gms/wearable/NodeApi.GetConnectedNodesResult)\\\u003e\n**getConnectedNodes** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client)\n\nGets a list of nodes to which this device is currently connected, either directly or\nindirectly via a directly connected node.\n\nThe returned list will not include the [local node](/android/reference/com/google/android/gms/wearable/NodeApi#getLocalNode(com.google.android.gms.common.api.GoogleApiClient)). \n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[NodeApi.GetLocalNodeResult](/android/reference/com/google/android/gms/wearable/NodeApi.GetLocalNodeResult)\\\u003e\n**getLocalNode** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client)\n\nGets the [Node](/android/reference/com/google/android/gms/wearable/Node) that\nrefers to this device. The information in the returned [Node](/android/reference/com/google/android/gms/wearable/Node) can be\npassed to other devices using the [MessageApi](/android/reference/com/google/android/gms/wearable/MessageApi),\nfor example."]]