PutDataMapRequest | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
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.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## 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, `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.