public final class

DataType

extends Object
implements SafeParcelable
java.lang.Object
   ↳ com.google.android.gms.fitness.data.DataType

Class Overview

The data type defines the schema for a stream of data being collected by, inserted into, or queried from Google Fit. The data type defines only the representation and format of the data, and not how it's being collected, the sensor being used, or the parameters of the collection.

Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform, and can be referred to by accessing their definition in DataTypes.

The same underlying concept may be represented by different data types, depending on how data is represented. For example, the com.google.step_count.delta data type represents step count data as delta (new steps) between different readings, while the com.google.step_count.cumulative data type represents step count data as a sum since the start of the count. The platform has built-in support for converting between compatible data types.

A data type contains one or more fields. In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.).

The data types in the com.google namespace are fixed and can only be updated in new releases of the platform.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
Fields
public static final Creator<DataType> CREATOR
Public Methods
int describeContents()
boolean equals(Object that)
List<Field> getFields()
Returns the ordered list of fields for the data type.
String getName()
Returns the namespaced name which uniquely identifies this data type.
int hashCode()
int indexOf(Field field)
Return the index of a field
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<DataType> CREATOR

Public Methods

public int describeContents ()

public boolean equals (Object that)

public List<Field> getFields ()

Returns the ordered list of fields for the data type.

public String getName ()

Returns the namespaced name which uniquely identifies this data type.

public int hashCode ()

public int indexOf (Field field)

Return the index of a field

public String toString ()

public void writeToParcel (Parcel dest, int flags)