DataUpdateNotification

public class DataUpdateNotification extends Object
implements Parcelable

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.

Constant Summary

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

Inherited Constant Summary

Field Summary

public static final Creator<DataUpdateNotification> CREATOR

Public Method Summary

boolean
equals(Object other)
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
String
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

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

public static final int OPERATION_INSERT

Constant Value: 1

public static final int OPERATION_UPDATE

Constant Value: 3

Fields

public static final Creator<DataUpdateNotification> CREATOR

Public Methods

public boolean equals (Object other)

public DataSource getDataSource ()

Retrieves the dataSource whose data has been modified.

public DataType getDataType ()

Retrieves the dataType whose data has been modified.

public static DataUpdateNotification getDataUpdateNotification (Intent intent)

Retrieves the data update notification from the given intent.

public int getOperationType ()

Retrieves the operationType which causes the update in Fitness Store.

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.

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.

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)