# Interface WearableDataListener

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()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dataChanged(WearableMessage data)`
  Called when the peer publishes or updates the value at a path.
  `void`
  `dataRemoved(String path)`
  Called when the peer removes the value at a path.

- ## Method Details

  - ### dataChanged

    void dataChanged(WearableMessage data)

    Called when the peer publishes or updates the value at a path.

    ###### Parameters

    - `data`: the new value, addressed to the path the peer published it under

  - ### dataRemoved

    void dataRemoved(String path)

    Called when the peer removes the value at a path.

    ###### Parameters

    - `path`: the path whose value is gone