I want to check the connection status between android wear and mobile. I know the WearableListenerService service methods onPeerConnected and onPeerDisconected. They are callback methods. I want to check the connection status on the click of a button. How can I do this?
Wearable.NodeApi.getConnectedNodes returns a list of Nodes representing either the connected handheld (if called from the Wear app) or connected Wear devices (if called on the handheld). The list should be empty if there is no connection. Google has a short example here.