DataTypeCreateRequest.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

# DataTypeCreateRequest.Builder

extends Object

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

## Class Overview

Builder used to create new DataTypeInsertRequests.

## Summary

Public Constructors
| DataTypeCreateRequest.Builder()

Public Methods
DataTypeCreateRequest.Builder | addField(Field field) Adds the specified field to the new data type.
DataTypeCreateRequest.Builder | addField(String name, int format) Adds a new field with the specified name and format to the new data type.
DataTypeCreateRequest | build() Finishes building and returns the request.
DataTypeCreateRequest.Builder | setName(String name) Set the name for the new data type.

[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 DataTypeCreateRequest.Builder ()

## Public Methods

#### public DataTypeCreateRequest.Builder addField (Field field)

Adds the specified field to the new data type.

#### public DataTypeCreateRequest.Builder addField (String name, int format)

Adds a new field with the specified name and format to the new data type.

#### public DataTypeCreateRequest build ()

Finishes building and returns the request.

##### Throws

IllegalStateException | if name or data fields are not specified.

#### public DataTypeCreateRequest.Builder setName (String name)

Set the name for the new data type. For private data types the name must have a format `packageName + "." + typeName`, where `packageName` is the application package name and `typeName` is a unique identifier of the `DataType` withing package.