| java.lang.Object | |
| ↳ | com.google.android.gms.fitness.SessionReadRequest.Builder |
Builder used to create new SessionReadRequest.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a specific data source we want data from to this request.
| |||||||||||
Adds the default data source for the given
dataType to this request. | |||||||||||
Finishes building and returns the request.
| |||||||||||
Adds option to read sessions from other apps.
| |||||||||||
Adds an optional session id for the request.
| |||||||||||
Adds an optional session name for the request.
| |||||||||||
Sets the time range for our query.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Adds a specific data source we want data from to this request. Either this method or
addDefaultDataSource(DataType) must be called to add at least one data source
to the request.
The data returned from this data source may not be necessarily inserted together with the session.
| dataSource | the data source we're reading |
|---|
Adds the default data source for the given dataType to this request. The
default data source is selected based on all available sources for the given data
type, and may be averaged or filtered.
The data returned from this data source may not have been inserted together with the session.
This method can be used instead of addDataSource(DataSource) when the
application is not interested in a specific data source.
| dataType | the data type we are reading |
|---|
Finishes building and returns the request.
| IllegalArgumentException | if the builder doesn't have valid time interval data to create a read request |
|---|---|
| IllegalStateException | if the builder doesn't have valid data type or data source to create a read request |
Adds option to read sessions from other apps. If not set, only sessions added by the calling app will be returned.
Adds an optional session id for the request. If not specified, all sessions in the specified time interval are returned.
| sessionId | the Id of the session we want data for. |
|---|
Adds an optional session name for the request. If not specified, all sessions in the specified time interval are returned.
| sessionName | the name of the session we want data for. |
|---|
Sets the time range for our query.
A defined start and time is required for every read query, even though session name and id are optional. All sessions that fall in the specified time interval and which match the other optional filters are returned. For a session to be returned, it has to fall within the interval specified in the query. Overlapping sessions with start and/or end times outside the interval will not be returned. Continuing sessions with no end time specified yet, but with start time after the query start time are also returned.
| startTime | a start time since epoch, inclusive |
|---|---|
| endTime | an end time since epoch, inclusive |
| timeUnit | time unit for the start and end times. |