public class

DataUpdateNotification

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.fitness.data.DataUpdateNotification

Class Overview

Captures the information needed to identify updates to Google Fitness Store data. Currently, it includes the time range for which update happened, the type of operation which resulted in update along with the dataSource/dataType of the data which was modified.

Summary

Constants
String ACTION
String EXTRA_DATA_UPDATE_NOTIFICATION Name for the long intent extra containing the data update notification.
int OPERATION_DELETE
int OPERATION_INSERT
int OPERATION_UPDATE
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<DataUpdateNotification> CREATOR
Public Methods
boolean equals(Object o)
DataSource getDataSource()
Retrieves the dataSource whose data has been modified.
DataType getDataType()
Retrieves the dataType whose data has been modified.
static DataUpdateNotification getDataUpdateNotification(Intent intent)
Retrieves the data update notification from the given intent.
int getOperationType()
Retrieves the operationType which causes the update in Fitness Store.
long getUpdateEndTime(TimeUnit timeUnit)
Retrieves the endTime of the interval range for which data has been modified in the given unit since epoch.
long getUpdateStartTime(TimeUnit timeUnit)
Retrieves the startTime of the interval range for which data has been modified in the given unit since epoch.
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String ACTION

Constant Value: "com.google.android.gms.fitness.DATA_UPDATE_NOTIFICATION"

public static final String EXTRA_DATA_UPDATE_NOTIFICATION

Name for the long intent extra containing the data update notification. It can be extracted using getDataUpdateNotification(Intent).

Constant Value: "vnd.google.fitness.data_udpate_notification"

public static final int OPERATION_DELETE

Constant Value: 2 (0x00000002)

public static final int OPERATION_INSERT

Constant Value: 1 (0x00000001)

public static final int OPERATION_UPDATE

Constant Value: 3 (0x00000003)

Fields

public static final Creator<DataUpdateNotification> CREATOR

Public Methods

public boolean equals (Object o)

Parameters
o Object
Returns
boolean

public DataSource getDataSource ()

Retrieves the dataSource whose data has been modified.

Returns
DataSource

public DataType getDataType ()

Retrieves the dataType whose data has been modified.

Returns
DataType

public static DataUpdateNotification getDataUpdateNotification (Intent intent)

Retrieves the data update notification from the given intent.

Parameters
intent Intent
Returns
DataUpdateNotification

public int getOperationType ()

Retrieves the operationType which causes the update in Fitness Store.

Returns
int

public long getUpdateEndTime (TimeUnit timeUnit)

Retrieves the endTime of the interval range for which data has been modified in the given unit since epoch. A valid end time is always set.

Parameters
timeUnit TimeUnit
Returns
long

public long getUpdateStartTime (TimeUnit timeUnit)

Retrieves the startTime of the interval range for which data has been modified in the given unit since epoch. A valid start time is always set.

Parameters
timeUnit TimeUnit
Returns
long

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int