java.lang.Object | |
↳ | com.google.android.gms.fitness.data.Bucket |
A bucket represents a time interval over which aggregated data is computed. For example, a bucket can represent user's average speed and average heart rate over a 1 hour interval. Currently we allow buckets to be computed by only one of the following strategies:
FitnessActivities
activity segment
A Bucket consists of the following fields:
FitnessActivities
. This is an optional field and
is set only if the read query had requested bucketing of data by activity segments.
DataSets
for the aggregated data types
requested in the read query over the time interval of this bucket.
TYPE_TIME
, TYPE_SESSION
,
TYPE_ACTIVITY_SEGMENT
or TYPE_ACTIVITY_TYPE
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TYPE_ACTIVITY_SEGMENT | Type constant denoting that bucketing by individual activity segment is requested. | |||||||||
int | TYPE_ACTIVITY_TYPE | Type constant denoting that bucketing by activity type is requested. | |||||||||
int | TYPE_SESSION | Type constant denoting that bucketing by session is requested. | |||||||||
int | TYPE_TIME | Type constant denoting that bucketing by time is requested. |
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the type of the bucket.
| |||||||||||
Returns the data set of requested data type over the time interval of the bucket.
| |||||||||||
Returns the requested data sets over the time interval of the bucket.
| |||||||||||
Returns the end time of the bucket, in the given time unit since epoch.
| |||||||||||
Returns the session of the bucket if bucketing by session was requested,
null
otherwise.
| |||||||||||
Returns the start time of the bucket, in the given time unit since epoch.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||
![]() |
Type constant denoting that bucketing by individual activity segment is requested.
Type constant denoting that bucketing by activity type is requested.
Type constant denoting that bucketing by session is requested.
Type constant denoting that bucketing by time is requested.
Returns the type of the bucket.
Returns the data set of requested data type over the time interval of the bucket. Returns null, if data set for the requested type is not found.
Returns the requested data sets over the time interval of the bucket.
Returns the end time of the bucket, in the given time unit since epoch.
Returns the session of the bucket if bucketing by session was requested, null
otherwise.
Returns the start time of the bucket, in the given time unit since epoch.