0

On Android wear, the NodeAPi has interfaces to fetch the connected node. This connected node is maintained by the OS itself somewhere (guessing it is in gms.wearable shared preferences). Because of this reason, when one tries to switch a connected device of the watch to another one, Android Wear 4.4W2 prevents this switch.

is there a way to remove the connected node on wear side programmatically?

addListener(GoogleApiClient client, NodeApi.NodeListener listener)
getConnectedNodes(GoogleApiClient client)
getLocalNode(GoogleApiClient client)
removeListener(GoogleApiClient client, NodeApi.NodeListener listener)

Above is the list of NodeAPIs from Android wear documentation. From my analysis, I just think they are either missing the API to removeConnectedNode or they simply want to hang on to the 1st connected node after factory reset.. The latter seems bad design and currently seems to be the case with Android 4.4W2 update.

1 Answers1

1

I don't know for 4.4W2 since there's now an option to dissociate connected devices, but as far as 4.4W1, you could not associate your Wear device with more than 1 handlheld device per factory reset, ie if you want to disconnect your watch from your companion handheld, apart from turning off the Bluetooth connection from the handheld (if you just want to interrupt the communication) or manually resetting your watch, you can't dissociate the devices.

EDIT
Just tested the dissociate option. Doesn't do anything on my Samsung Gear Live except starting an activity saying "Dissociate the devices". So I guess that what was true on 4.4W1 is still true for 4.4W2

Tony Malghem
  • 222
  • 2
  • 11
  • where is "dissociate option" listed? – Mahesh Renduchintala Oct 31 '14 at 17:04
  • Options > Bluetooth devices > Dissociate devices, at the bottom of the list. But I think it's only for companion devices such as earplug. – Tony Malghem Nov 03 '14 at 09:45
  • Correct. The thing is once the wear device is hooked up to a phone/Tablet (node), then it is impossible to change that connection until a factory reset. This is because they store the node ID somewhere and let that node be the only node to connect to connect. – Mahesh Renduchintala Nov 03 '14 at 18:50
  • Yup, it was what I said in my answer, just didn't have the time to check on the dissociate option back then – Tony Malghem Nov 04 '14 at 08:30
  • I couldn't see the option on W.W2. I assure you I had time. Thanks for the tip. The question was on programming aspects of removing a node. Any comments on that before I accept your answer? – Mahesh Renduchintala Nov 04 '14 at 16:00
  • 1
    Sorry, I meant **I** didn't have the time to check it out ;) Back to the question : for the same reasons you gave in your comment, I don't think it's possible to do it programmatically, you can decide not to connect to a node (or at least not to communicate with it), but I don't think you can properly dissociate them, except from factory resetting your device. – Tony Malghem Nov 04 '14 at 16:18