java.lang.Object | |
↳ | com.google.android.gms.fitness.data.Session.Builder |
Builder used to create new Sessions.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an instance of the
Session.Builder .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Finishes building and returns the session.
| |||||||||||
Sets the activity associated with this session.
| |||||||||||
Sets a description for this session.
| |||||||||||
Sets the end time of the session.
| |||||||||||
Sets the identifier for this session.
| |||||||||||
Sets the a human readable name of the session.
| |||||||||||
Sets the start time of the session.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Finishes building and returns the session. Returned session will always have non-empty non-null identifier.
IllegalStateException | if the builder doesn't have enough state to create a valid request |
---|
Sets the activity associated with this session. The specified activity value should be
one of the values in FitnessActivities
. If an unrecognized value is specified,
or if not specified, the activity for the session is set to
UNKNOWN
.
Sets the end time of the session. If end time is not specified, session is considered to be still ongoing.
time | an end time, in the given unit since epoch, inclusive |
---|---|
timeUnit | the unit of the timestamp |
Sets the identifier for this session. Must be unique for the client application.
Sets the start time of the session.
time | a start time, in the given unit since epoch, inclusive |
---|---|
timeUnit | the unit of the timestamp |