From bdeeb5e3bc877e79f643a7ed6cfc7ce188551104 Mon Sep 17 00:00:00 2001 From: Luan Nguyen Date: Thu, 23 Apr 2015 10:32:31 -0700 Subject: docs: Add note about overriding onConnectedNodes() when listening for capability node changes. bug: 20523695 Change-Id: I7a1b057625f6f39d9ee3a03948f0b187484b1842 --- docs/html/training/wearables/data-layer/messages.jd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'docs/html/training') 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
  • Send a Message
  • Receive a Message
  • +

    Try it out

    + @@ -138,6 +144,19 @@ private void setupVoiceTranscription() { } +

    Note: +If you create a service that extends +WearableListenerService +to detect capability changes, you may want to override the +onConnectedNodes() +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 +DisconnectListenerService class in the +FindMyPhone +sample. For more information on how to listen for important events, see +Listen for Data Layer Events. +

    +

    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 -- cgit v1.1