AI-generated Key Takeaways
-
DataItem
is the fundamental object for storing data within the Android Wear network, replicating across all connected devices. -
It comprises a small data blob and related
Asset
s, identifiable by a unique URI indicating its creator and path. -
DataItem
provides methods to access and manipulate its associated data and assets, includinggetAssets()
,getData()
,getUri()
, andsetData()
. -
DataMapItem
can be utilized to manage structured data andAsset
s within theDataItem
. -
The maximum size for a
DataItem
is around 100KB, although it is recommended to keep them considerably smaller.
The base object of data stored in the Android Wear network. DataItem
are
replicated across all devices in the network. It contains a small blob of data and associated
Asset
s.
A DataItem
is
identified by its Uri, which contains its creator and a path.
See Also
Public Method Summary
abstract Map<String, DataItemAsset> | |
abstract byte[] | |
abstract Uri | |
abstract DataItem |
Inherited Method Summary
Public Methods
public abstract Map<String, DataItemAsset> getAssets ()
A map of Asset
s
associated with this DataItem
.
DataMapItem
may be used to store structured data in the network, including Asset
s.
public abstract byte[] getData ()
An array of data stored at the specified Uri
. DataMapItem
may be used to store structured data in the network.
public abstract Uri getUri ()
Returns the DataItem
's
Uri. Uri.getHost()
returns the id of the node that created it.