DataClient.OnDataChangedListener

  • DataClient.OnDataChangedListener is an interface used to receive data events on Android Wear devices.

  • It is used with DataClient.addListener() to register for data change notifications.

  • The onDataChanged() method is triggered when data items are changed or deleted, providing a DataEventBuffer containing information about the changes.

  • For persistent usage outside the callback, DataEvent objects within the buffer should be frozen.

public static interface DataClient.OnDataChangedListener implements DataApi.DataListener

Public Method Summary

abstract void
onDataChanged(DataEventBuffer dataEvents)
Notification that a set of data items have been changed or deleted.

Inherited Method Summary

Public Methods

public abstract void onDataChanged (DataEventBuffer dataEvents)

Notification that a set of data items have been changed or deleted. The data buffer is released upon completion of this method. If a caller wishes to use the events outside this callback, they should be sure to freeze the DataEvent objects they wish to use.