public interface WearableDataListener

Notified when replicated data changes on the peer.

Callbacks arrive on the EDT, and changes that landed while your app was not running are replayed to the first listener you register – that is the point of replicated data, so register from your app’s init().

Methods

public abstract void dataChanged(WearableMessage data)Called when the peer publishes or updates the value at a path.
public abstract void dataRemoved(String path)Called when the peer removes the value at a path.

Method details

dataChanged

public abstract void dataChanged(WearableMessage data)
Called when the peer publishes or updates the value at a path.

Parameters

data WearableMessage
the new value, addressed to the path the peer published it under

dataRemoved

public abstract void dataRemoved(String path)
Called when the peer removes the value at a path.

Parameters

path String
the path whose value is gone