DataEvent | 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: Constants | Methods | Inherited Methods | [Expand All]
public interface

# DataEvent

implements Freezable<T>

com.google.android.gms.wearable.DataEvent

## Class Overview

Data interface for data events.

## Summary

Constants
int | TYPE_CHANGED | Indicates that the enclosing DataEvent was triggered by a data item being added or changed.
int | TYPE_DELETED | Indicates that the enclosing DataEvent was triggered by a data item being deleted.

Public Methods
abstract DataItem | getDataItem()
abstract int | getType()

[Expand] Inherited Methods
From interface com.google.android.gms.common.data.Freezable
abstract T | freeze() Freeze a volatile representation into an immutable representation.
abstract boolean | isDataValid() Check to see if this object is valid for use.

## Constants

#### public static final int TYPE_CHANGED

Indicates that the enclosing DataEvent was triggered by a data item being added or changed.

Constant Value: 1 (0x00000001)

#### public static final int TYPE_DELETED

Indicates that the enclosing DataEvent was triggered by a data item being deleted.

Constant Value: 2 (0x00000002)

## Public Methods

#### public abstract DataItem getDataItem ()

##### Returns

- the data item modified in this event. An event of `TYPE_DELETED` will only have its {DataItem#getUri} populated.

#### public abstract int getType ()

##### Returns

- the type of event this is. One of `TYPE_CHANGED`, `TYPE_DELETED`.