DataTypeCreateRequest

public class DataTypeCreateRequest extends Object
implements Parcelable

This class is deprecated.
Support for custom data types will be removed in a future version of Google Fit. Use one of the pre-defined data types listed in DataType.

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 must 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 only to the app that created this data type.

The new data type name must 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(Field.FIELD_ACTIVITY)
          .build();
 

Nested Class Summary

class DataTypeCreateRequest.Builder Builder used to create new DataTypeInsertRequests. 

Inherited Constant Summary

Field Summary

public static final Creator<DataTypeCreateRequest> CREATOR

Public Method Summary

boolean
List<Field>
getFields()
Returns the specified fields for the created data type.
String
getName()
Returns the specified name for the crated data type.
int
String
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Fields

public static final Creator<DataTypeCreateRequest> CREATOR

Public Methods

public boolean equals (Object o)

public List<Field> getFields ()

Returns the specified fields for the created data type.

public String getName ()

Returns the specified name for the crated data type.

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)