DataApi.DataListener
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
|
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`DataApi.DataListener` is deprecated; use `DataClient.OnDataChangedListener` instead."],["It was used to receive data events in wearables, triggered by changes or deletions."],["`onDataChanged()` is the key method, providing a buffer of `DataEvent` objects reflecting the changes."],["`WearableListenerService` can also be used to handle similar data and connectivity events."]]],["`DataApi.DataListener` is a deprecated interface for receiving data events. Instead, `DataClient.OnDataChangedListener` should be used. `DataApi.DataListener` uses `onDataChanged` method that triggers when data items change or are deleted. This method receives a `DataEventBuffer`, which must be processed before it is released. If the data is used outside of `onDataChanged`, the `DataEvent` objects need to be frozen.\n"]]