java.lang.Object | |
↳ | com.google.android.gms.fitness.data.Field |
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 withFIELD_
. 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)
.
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 | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR | |||||||||||
FIELD_ACCURACY | The accuracy of an accompanied value (such as location). | ||||||||||
FIELD_ACTIVITY |
An activity type of FitnessActivities , encoded as an integer for efficiency.
|
||||||||||
FIELD_ALTITUDE | An altitude of a location represented as a float, in meters above sea level. | ||||||||||
FIELD_AVERAGE | An average value. | ||||||||||
FIELD_BPM | A heart rate in beats per minute. | ||||||||||
FIELD_CALORIES | Calories in kcal. | ||||||||||
FIELD_CONFIDENCE | The confidence of an accompanied value, specified as a value between 0.0 and 100.0. | ||||||||||
FIELD_DISTANCE | A distance in meters. | ||||||||||
FIELD_DURATION | A duration in milliseconds. | ||||||||||
FIELD_HEIGHT | A height in meters. | ||||||||||
FIELD_HIGH_LATITUDE | A high latitude of a location bounding box represented as a float, in degrees. | ||||||||||
FIELD_HIGH_LONGITUDE | A high longitude of a location bounding box represented as a float, in degrees. | ||||||||||
FIELD_LATITUDE | A latitude of a location represented as a float, in degrees. | ||||||||||
FIELD_LONGITUDE | A longitude of a location represented as a float, in degrees. | ||||||||||
FIELD_LOW_LATITUDE | A low latitude of a location bounding box represented as a float, in degrees. | ||||||||||
FIELD_LOW_LONGITUDE | A low longitude of a location bounding box represented as a float, in degrees. | ||||||||||
FIELD_MAX | A maximum value. | ||||||||||
FIELD_MIN | A minimum value. | ||||||||||
FIELD_NUM_SEGMENTS | A number of segments. | ||||||||||
FIELD_REVOLUTIONS | A count of revolutions. | ||||||||||
FIELD_RPM | Revolutions per minute or rate per minute. | ||||||||||
FIELD_SPEED | A speed in meter/sec. | ||||||||||
FIELD_STEPS | A count of steps. | ||||||||||
FIELD_WATTS | Power in watts. | ||||||||||
FIELD_WEIGHT | A weight in kilograms. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the format of the field, as one of the format constant values.
| |||||||||||
Returns the name of the field.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||
![]() |
Format constant indicating the field holds float values.
Format constant indicating the field holds integer values.
An activity type of FitnessActivities
, encoded as an integer for efficiency. The
activity value should be stored using setActivity(String)
,
and read using asActivity()
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.
The confidence of an accompanied value, specified as a value between 0.0 and 100.0.
A high latitude of a location bounding box represented as a float, in degrees.
A high longitude of a location bounding box represented as a float, in degrees.
A latitude of a location represented as a float, in degrees.
A longitude of a location represented as a float, in degrees.
A low latitude of a location bounding box represented as a float, in degrees.
A low longitude of a location bounding box represented as a float, in degrees.
Returns the format of the field, as one of the format constant values.
Returns the name of the field.