com.google.android.gms.wearable.DataApi |
Exposes an API for components to read or write DataItem
s and Asset
s.
A DataItem
is synchronized across all devices in an Android Wear network. DataItems
should generally be smaller in size, relying on Asset
s for the storage of larger, more
persistent data objects such as images.
DataItem
s are identified by a Uri, accessible with getUri()
that
indicates the item's creator and path.
A DataItem
is private to the application that created it and accessibly only by that
application on other nodes.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DataApi.DataItemResult | Contains a single data item. | ||||||||||
DataApi.DataListener | Used with addListener(GoogleApiClient, DataApi.DataListener) to receive data events. |
||||||||||
DataApi.DeleteDataItemsResult | Contains the number of deleted items. | ||||||||||
DataApi.GetFdForAssetResult | Contains a file descriptor for the requested asset. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Registers a listener to receive data item changed and deleted events.
| |||||||||||
Removes all specified
DataItem s from the Android Wear network. | |||||||||||
Retrieves a single
DataItem from the Android Wear network. | |||||||||||
Retrieves all
DataItem s from the Android Wear network. | |||||||||||
Retrieves all
DataItem s matching the provided Uri, from the Android Wear network. | |||||||||||
Retrieves a
ParcelFileDescriptor pointing at the bytes of an asset. | |||||||||||
Retrieves a
ParcelFileDescriptor pointing at the bytes of an asset. | |||||||||||
Adds
DataItem to the Android Wear network. | |||||||||||
Removes a data listener.
|
Registers a listener to receive data item changed and deleted events.
Removes all specified DataItem
s from the Android Wear network.
Using glob uri selectors will allow this call to delete multiple data items at once.
Retrieves a single DataItem
from the Android Wear network. A fully qualified Uri
must be specified. The uri's host must be a node that created the item.
Retrieves a ParcelFileDescriptor
pointing at the bytes of an asset. Only assets
previously stored in a DataItem
may be retrieved.
Retrieves a ParcelFileDescriptor
pointing at the bytes of an asset. Only assets
previously stored in a DataItem
may be retrieved.
Adds DataItem
to the Android Wear network. The updated item is synchronized across
all devices.
Removes a data listener.