NodeClient.OnNodeMigratedListener
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
|
Receives events after a node migration has successfully finished.
Public Methods
public abstract void onNodeMigrated (String nodeId, DataItemBuffer
archive)
Notification that a watch has migrated from a previous phone to this phone.
This notification contains an archive of the data items written by the previous
phone. You may inspect the data items in the archive and integrate them into your own
data items.
After this method completes, the data buffer is
released
and any data items it contains become invalid. You should
freeze
any data items that you wish to use after the callback completes.
You may want to filter the archive data items by path during this callback, freezing
a subset of them into a temporary collection, and then schedule the work of processing
and saving your data into a worker thread.
Parameters
nodeId |
nodeId of the migrating watch. |
archive |
the archive of DataItem s
from the previous phone. |
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."],[[["The `NodeClient.OnNodeMigratedListener` interface receives events after a node migration, such as when a watch switches to a new phone."],["The `onNodeMigrated` method provides an archive of data items from the previous phone for integration."],["Developers should process and save the received data, potentially filtering by path and using worker threads for efficiency."],["It's crucial to freeze any desired data items from the archive before the callback completes, as the buffer is released afterward."]]],["The `NodeClient.OnNodeMigratedListener` interface receives events post-node migration. The `onNodeMigrated` method is triggered when a watch migrates to a new phone. This method provides the migrating watch's `nodeId` and a `DataItemBuffer` archive containing data from the previous phone. Developers should inspect, potentially filter, and freeze relevant data items from the archive, as it is released after the method completes. The data should be integrated into their data.\n"]]