Subscription | 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: Inherited Constants | Fields | Methods | Inherited Methods | [Expand All]
public class

# Subscription

extends Object
implements Parcelable

java.lang.Object
↳ | com.google.android.gms.fitness.data.Subscription

## Class Overview

Subscription for persistent storage of data from a given `data source` or for a given `data type`.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Fields
public static final Creator<Subscription> | CREATOR |

Public Methods
int | describeContents()
boolean | equals(Object that)
DataSource | getDataSource() Returns the data source for this subscription, if specified.
DataType | getDataType() Returns the data type for this subscription, if specified.
int | hashCode()
String | toDebugString()
String | toString()
void | writeToParcel(Parcel dest, int flags)

[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)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final Creator<Subscription> CREATOR

## Public Methods

#### public int describeContents ()

#### public boolean equals (Object that)

#### public DataSource getDataSource ()

Returns the data source for this subscription, if specified.

##### Returns

- the specified data source, or `null` if none specified

#### public DataType getDataType ()

Returns the data type for this subscription, if specified.

##### Returns

- the specified data type, or `null` if none specified

#### public int hashCode ()

#### public String toDebugString ()

#### public String toString ()

#### public void writeToParcel (Parcel dest, int flags)