public class

PutDataMapRequest

extends Object
java.lang.Object
   ↳ com.google.android.gms.wearable.PutDataMapRequest

Class Overview

PutDataMapRequest is a DataMap-aware version of PutDataRequest.

Summary

Public Methods
PutDataRequest asPutDataRequest()
Creates a PutDataRequest containing the data and assets in this PutDataMapRequest.
static PutDataMapRequest create(String path)
Creates a PutDataMapRequest with the provided, complete, path.
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()
Uri getUri()
Returns a Uri for the pending data item.
boolean isUrgent()
Whether the DataItem for this request is urgent.
PutDataMapRequest setUrgent()
Flags this DataItem for urgent transport.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public PutDataRequest asPutDataRequest ()

Creates a PutDataRequest containing the data and assets in this PutDataMapRequest.

Returns
PutDataRequest

public static PutDataMapRequest create (String path)

Creates a PutDataMapRequest with the provided, complete, path.

Parameters
path String
Returns
PutDataMapRequest

public static PutDataMapRequest createFromDataMapItem (DataMapItem source)

Creates a PutDataMapRequest from a DataMapItem using the provided source.

Parameters
source DataMapItem
Returns
PutDataMapRequest

public static PutDataMapRequest createWithAutoAppendedId (String pathPrefix)

Creates a PutDataMapRequest with a randomly generated id prefixed with the provided path.

Parameters
pathPrefix String
Returns
PutDataMapRequest

public DataMap getDataMap ()

Returns
DataMap 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, 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.

Returns
Uri

public boolean isUrgent ()

Whether the DataItem for this request is urgent.

Returns
boolean true if the DataItem for this request is urgent

See also:

public PutDataMapRequest setUrgent ()

Flags this DataItem for urgent transport. Clients should only setUrgent() for DataItems which need to be delivered right away.

Returns
PutDataMapRequest

See also: