diff options
| author | Joe Fernandez <joefernandez@google.com> | 2015-04-28 00:36:29 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-28 00:36:29 +0000 |
| commit | f488985dce6424446a458f08f2c141b64ac07e39 (patch) | |
| tree | 53eb8b3f97b00e105a0fa126079c7dcc991b965f /docs/html | |
| parent | d602d23fd81d7b70d76c596d9b0ae7a4cfd98e02 (diff) | |
| parent | ff31bb4bb7d46766552526f6580a76445a549339 (diff) | |
| download | frameworks_base-f488985dce6424446a458f08f2c141b64ac07e39.zip frameworks_base-f488985dce6424446a458f08f2c141b64ac07e39.tar.gz frameworks_base-f488985dce6424446a458f08f2c141b64ac07e39.tar.bz2 | |
am ff31bb4b: am 68ef9287: Merge "docs: Add note about overriding onConnectedNodes() when listening for capability node changes." into lmp-mr1-ub-docs
* commit 'ff31bb4bb7d46766552526f6580a76445a549339':
docs: Add note about overriding onConnectedNodes() when listening for capability node changes.
Diffstat (limited to 'docs/html')
| -rw-r--r-- | docs/html/training/wearables/data-layer/messages.jd | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/html/training/wearables/data-layer/messages.jd b/docs/html/training/wearables/data-layer/messages.jd index 0826e6b..043aff2 100644 --- a/docs/html/training/wearables/data-layer/messages.jd +++ b/docs/html/training/wearables/data-layer/messages.jd @@ -10,6 +10,12 @@ page.title=Sending and Receiving Messages <li><a href="#SendMessage">Send a Message</a></li> <li><a href="#ReceiveMessage">Receive a Message</a></li> </ol> +<h2>Try it out</h2> +<ul> + <li> + <a href="https://github.com/googlesamples/android-FindMyPhone/" class="external-link">FindMyPhone</a> + </li> +</ul> </div> </div> @@ -138,6 +144,19 @@ private void setupVoiceTranscription() { } </pre> +<p class="note"><strong>Note:</strong> +If you create a service that extends +<a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html"><code>WearableListenerService</code></a> +to detect capability changes, you may want to override the +<a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onConnectedNodes(java.util.List<com.google.android.gms.wearable.Node>)"><code>onConnectedNodes()</code></a> +method to listen to finer-grained connectivity details, such as when a wearable device switches +from Wi-Fi to a Bluetooth connection to the handset. For an example implementation, see the +<code>DisconnectListenerService</code> class in the +<a href="https://github.com/googlesamples/android-FindMyPhone/" class="external-link">FindMyPhone</a> +sample. For more information on how to listen for important events, see +<a href="{@docRoot}training/wearables/data-layer/events.html#Listen">Listen for Data Layer Events</a>. +</p> + <p>After detecting the capable nodes, determine where to send the message. You should pick a node that is in close proximity to your wearable device to minimize message routing through multiple nodes. A nearby node is defined as one that is directly |
