public final class

Field

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

Class Overview

A field represents one dimension of a data type. It defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.

This class contains constants representing the field names of common data types, each prefixed with FIELD_. These can be used to access and set the fields via DataPoint.getValue(Field).

Fields for custom data types can be created using addField(String, int).

Summary

Constants
int FORMAT_FLOAT Format constant indicating the field holds float values.
int FORMAT_INT32 Format constant indicating the field holds integer values.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Field> CREATOR
public static final Field FIELD_ACCURACY The accuracy of an accompanied value (such as location).
public static final Field FIELD_ACTIVITY An activity type of FitnessActivities, encoded as an integer for efficiency.
public static final Field FIELD_ALTITUDE An altitude of a location represented as a float, in meters above sea level.
public static final Field FIELD_AVERAGE An average value.
public static final Field FIELD_BPM A heart rate in beats per minute.
public static final Field FIELD_CALORIES Calories in kcal.
public static final Field FIELD_CONFIDENCE The confidence of an accompanied value, specified as a value between 0.0 and 100.0.
public static final Field FIELD_DISTANCE A distance in meters.
public static final Field FIELD_DURATION A duration in milliseconds.
public static final Field FIELD_HEIGHT A height in meters.
public static final Field FIELD_HIGH_LATITUDE A high latitude of a location bounding box represented as a float, in degrees.
public static final Field FIELD_HIGH_LONGITUDE A high longitude of a location bounding box represented as a float, in degrees.
public static final Field FIELD_LATITUDE A latitude of a location represented as a float, in degrees.
public static final Field FIELD_LONGITUDE A longitude of a location represented as a float, in degrees.
public static final Field FIELD_LOW_LATITUDE A low latitude of a location bounding box represented as a float, in degrees.
public static final Field FIELD_LOW_LONGITUDE A low longitude of a location bounding box represented as a float, in degrees.
public static final Field FIELD_MAX A maximum value.
public static final Field FIELD_MIN A minimum value.
public static final Field FIELD_NUM_SEGMENTS A number of segments.
public static final Field FIELD_REVOLUTIONS A count of revolutions.
public static final Field FIELD_RPM Revolutions per minute or rate per minute.
public static final Field FIELD_SPEED A speed in meter/sec.
public static final Field FIELD_STEPS A count of steps.
public static final Field FIELD_WATTS Power in watts.
public static final Field FIELD_WEIGHT A weight in kilograms.
Public Methods
int describeContents()
boolean equals(Object that)
int getFormat()
Returns the format of the field, as one of the format constant values.
String getName()
Returns the name of the field.
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 int FORMAT_FLOAT

Format constant indicating the field holds float values.

Constant Value: 2 (0x00000002)

public static final int FORMAT_INT32

Format constant indicating the field holds integer values.

Constant Value: 1 (0x00000001)

Fields

public static final Creator<Field> CREATOR

public static final Field FIELD_ACCURACY

The accuracy of an accompanied value (such as location).

public static final Field FIELD_ACTIVITY

An activity type of FitnessActivities, encoded as an integer for efficiency. The activity value should be stored using setActivity(String), and read using asActivity()

public static final Field FIELD_ALTITUDE

An altitude of a location represented as a float, in meters above sea level. Some location samples don't have an altitude value so this field might not be set.

public static final Field FIELD_AVERAGE

An average value.

public static final Field FIELD_BPM

A heart rate in beats per minute.

public static final Field FIELD_CALORIES

Calories in kcal.

public static final Field FIELD_CONFIDENCE

The confidence of an accompanied value, specified as a value between 0.0 and 100.0.

public static final Field FIELD_DISTANCE

A distance in meters.

public static final Field FIELD_DURATION

A duration in milliseconds.

public static final Field FIELD_HEIGHT

A height in meters.

public static final Field FIELD_HIGH_LATITUDE

A high latitude of a location bounding box represented as a float, in degrees.

public static final Field FIELD_HIGH_LONGITUDE

A high longitude of a location bounding box represented as a float, in degrees.

public static final Field FIELD_LATITUDE

A latitude of a location represented as a float, in degrees.

public static final Field FIELD_LONGITUDE

A longitude of a location represented as a float, in degrees.

public static final Field FIELD_LOW_LATITUDE

A low latitude of a location bounding box represented as a float, in degrees.

public static final Field FIELD_LOW_LONGITUDE

A low longitude of a location bounding box represented as a float, in degrees.

public static final Field FIELD_MAX

A maximum value.

public static final Field FIELD_MIN

A minimum value.

public static final Field FIELD_NUM_SEGMENTS

A number of segments.

public static final Field FIELD_REVOLUTIONS

A count of revolutions.

public static final Field FIELD_RPM

Revolutions per minute or rate per minute.

public static final Field FIELD_SPEED

A speed in meter/sec.

public static final Field FIELD_STEPS

A count of steps.

public static final Field FIELD_WATTS

Power in watts.

public static final Field FIELD_WEIGHT

A weight in kilograms.

Public Methods

public int describeContents ()

public boolean equals (Object that)

public int getFormat ()

Returns the format of the field, as one of the format constant values.

public String getName ()

Returns the name of the field.

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)