AI-generated Key Takeaways
-
PutDataMapRequest
is a class that provides a way to create and manage data requests for wearable devices, specifically usingDataMap
for structured data. -
It offers methods for creating requests with specific paths, generating unique IDs, and setting urgency levels for data delivery.
-
PutDataMapRequest
can be converted into aPutDataRequest
for sending to the Wearable API and provides access to the data and URI associated with the request. -
This class simplifies data exchange between handheld and wearable devices by handling the complexities of data packaging and transmission.
PutDataMapRequest
is a DataMap
-aware
version of PutDataRequest
.
Public Method Summary
PutDataRequest |
asPutDataRequest()
Creates a
PutDataRequest
containing the data and assets in this PutDataMapRequest .
|
static PutDataMapRequest | |
static PutDataMapRequest |
createFromDataMapItem(DataMapItem
source)
Creates a
PutDataMapRequest
from a DataMapItem
using the provided source.
|
static PutDataMapRequest |
createWithAutoAppendedId(String pathPrefix)
Creates a
PutDataMapRequest
with a randomly generated id prefixed with the provided path.
|
DataMap |
getDataMap()
Returns the structured data associated with this data item.
|
Uri | |
boolean | |
PutDataMapRequest |
Inherited Method Summary
Public Methods
public PutDataRequest asPutDataRequest ()
Creates a PutDataRequest
containing the data and assets in this PutDataMapRequest
.
public static PutDataMapRequest create (String path)
Creates a PutDataMapRequest
with the provided, complete, path.
public static PutDataMapRequest createFromDataMapItem (DataMapItem source)
Creates a PutDataMapRequest
from a DataMapItem
using the provided source.
public static PutDataMapRequest createWithAutoAppendedId (String pathPrefix)
Creates a PutDataMapRequest
with a randomly generated id prefixed with the provided path.
public DataMap getDataMap ()
Returns the structured data associated with this data item.
public Uri getUri ()
Returns a Uri
for the pending
data item. If this is a modification of an existing data item, Uri.getHost()
will return the id of the node that originally created it. Otherwise, a new data item
will be created with the requesting device's node.
public boolean isUrgent ()
public PutDataMapRequest setUrgent ()
Flags this DataItem
for urgent transport. Clients should only
setUrgent()
for DataItem
s
which need to be delivered right away.