public class

DataTypeCreateRequest

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.fitness.request.DataTypeCreateRequest

Class Overview

A request for inserting an application-specific data type into the Google Fit store. Apps can use this request to define their own custom data types for reading and writing custom data.

The new data type should not duplicate any existing public data type. Apps can obtain the new data type from the result of this request, and use it to insert/read data. Data written in this data type will only be visible to the app that created this data type.

The new data type name should have the app's package name as the prefix. For instance, if the app's package name is "com.exampleapp", then a new data type named "com.exampleapp .custom_data" is permitted. However, a new data type named "com.anotherapp.custom_data" is not permitted.

Sample usage:

     DataTypeCreateRequest request = new DataTypeCreateRequest.Builder()
          .setName("com.app.custom_data")
          .addField("field1", Field.FORMAT_INT32)
          .addField(DataTypes.Fields.ACTIVITY)
          .build();
 

Summary

Nested Classes
class DataTypeCreateRequest.Builder Builder used to create new DataTypeInsertRequests. 
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<DataTypeCreateRequest> CREATOR
Public Methods
boolean equals(Object o)
List<Field> getFields()
Returns the specified fields for the created data type.
String getName()
Returns the specified name for the crated data type.
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<DataTypeCreateRequest> CREATOR

Public Methods

public boolean equals (Object o)

Parameters
o Object
Returns
boolean

public List<Field> getFields ()

Returns the specified fields for the created data type.

Returns
List<Field>

public String getName ()

Returns the specified name for the crated data type.

Returns
String

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int