SessionInsertRequest.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static class

# SessionInsertRequest.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.fitness.request.SessionInsertRequest.Builder

## Class Overview

Builder used to create new SessionInsertRequest.

## Summary

Public Constructors
| SessionInsertRequest.Builder()

Public Methods
SessionInsertRequest.Builder | addAggregateDataPoint(DataPoint aggregateDataPoint) Adds the specified aggregate data point for this request.
SessionInsertRequest.Builder | addDataSet(DataSet dataSet) Adds the specified data set for this request.
SessionInsertRequest | build() Finishes building and returns the request.
SessionInsertRequest.Builder | setSession(Session session) Sets the session for this request.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public SessionInsertRequest.Builder ()

## Public Methods

#### public SessionInsertRequest.Builder addAggregateDataPoint (DataPoint aggregateDataPoint)

Adds the specified aggregate data point for this request. Only one aggregate data point per data source is allowed for a session.

##### Throws

IllegalArgumentException | if the data point is null
IllegalStateException | if an aggregate data point for this data source is already added

#### public SessionInsertRequest.Builder addDataSet (DataSet dataSet)

Adds the specified data set for this request. Only one data set per data source is allowed for a session.

##### Throws

IllegalArgumentException | if the data set is null or empty
IllegalStateException | if data set for this data source is already added

#### public SessionInsertRequest build ()

Finishes building and returns the request.

##### Throws

IllegalStateException | if the builder doesn't have enough state to create a valid request

#### public SessionInsertRequest.Builder setSession (Session session)

Sets the session for this request.