DataItem
Stay organized with collections
Save and categorize content based on your preferences.
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.
Inherited Method Summary
From interface
com.google.android.gms.common.data.Freezable
abstract DataItem
|
freeze()
|
abstract boolean |
isDataValid()
|
Public Methods
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 ()
public abstract DataItem
setData (byte[]
data)
Sets the data in a DataItem
.
The current maximum DataItem
size limit is approximately 100k. DataItem
s
should generally be much smaller than this limit.
Note: Use an empty array if there is no data to store. null
is only
allowed for backwards compatibility.
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 2023-08-31 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]