java.lang.Object | |
↳ | com.google.android.gms.fitness.data.DataSource |
Definition of a unique source of sensor data. Data sources can expose raw data coming from
hardware sensors on local or companion devices. They can also expose derived data, created by
transforming or merging other data sources. Multiple data sources can exist for the same data type
. Every data point inserted into or read from Google Fit has an associated
data source.
The data source contains enough information to uniquely identify its data,
including the hardware device
and the application
that collected and/or transformed the data. It also holds useful metadata, such as a stream name
and the device type.
The data source's data stream can be accessed in a live fashion by registering a data source listener, or via queries over fixed time intervals.
An end-user-visible name for the data stream can be set by calling
setName(String)
or otherwise computed from the device model and application name.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DataSource.Builder | A builder that can be used to construct new data source objects. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DATA_QUALITY_BLOOD_GLUCOSE_ISO151972003 | ISO: 15197:2003 | |||||||||
int | DATA_QUALITY_BLOOD_GLUCOSE_ISO151972013 | ISO: 15197:2013 | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_AAMI | Association for the Advancement of Medical Instrumentation. | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_BHS_A_A | O'Brien et al. | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_BHS_A_B | O'Brien et al. | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_BHS_B_A | O'Brien et al. | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_BHS_B_B | O'Brien et al. | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_ESH2002 | O'Brien, Eoin, et al. | |||||||||
int | DATA_QUALITY_BLOOD_PRESSURE_ESH2010 | O'Brien, Atkins et al. | |||||||||
String | EXTRA_DATA_SOURCE | Name for the parcelable intent extra containing a data source. | |||||||||
int | TYPE_DERIVED | Type constant for a data source which exposes data which is derived from one or more existing data sources by performing transformations on the original data. | |||||||||
int | TYPE_RAW | Type constant for a data source which exposes original, raw data from an external source such as a hardware sensor, a wearable device, or user input. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Extracts the data source extra from the given intent, such as an intent to view user's data.
| |||||||||||
Returns the package name for the application responsible for setting the data, or
null
if unset/unknown. | |||||||||||
Returns a list of data quality standards adhered to by this data source.
| |||||||||||
Returns the data type for data coming from this data source.
| |||||||||||
Returns the device where data is being collected, or
null if unset. | |||||||||||
Returns the specified user-visible name for the data source, or
null if unset. | |||||||||||
Returns a unique identifier for the data stream produced by this data source.
| |||||||||||
Returns the specific
name for the stream coming form this
data source, or null if unset. | |||||||||||
Returns the constant describing the type of this data source.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
ISO: 15197:2003
ISO: 15197:2013
Association for the Advancement of Medical Instrumentation. American National Standard. Manual, electronic or automated sphygmomanometers ANSI/AAMI SP10-2002/A1. 3330 Washington Boulevard, Suite 400, Arlington, VA 22201-4598, USA: AAMI; 2003.
O'Brien et al. "The British Hypertension Society Protocol for the evaluation of blood pressure measuring devices." J Hypertens 1993;11(suppl 2):S43-S63. Meets A/A quality standard.
O'Brien et al. "The British Hypertension Society Protocol for the evaluation of blood pressure measuring devices." J Hypertens 1993;11(suppl 2):S43-S63. Meets A/B quality standard.
O'Brien et al. "The British Hypertension Society Protocol for the evaluation of blood pressure measuring devices." J Hypertens 1993;11(suppl 2):S43-S63. Meets B/A quality standard.
O'Brien et al. "The British Hypertension Society Protocol for the evaluation of blood pressure measuring devices." J Hypertens 1993;11(suppl 2):S43-S63. Meets B/B quality standard.
O'Brien, Eoin, et al. "Working Group on Blood Pressure Monitoring of the European Society of Hypertension International Protocol for validation of blood pressure measuring devices in adults." Blood pressure monitoring 7.1 (2002): 3-17.
O'Brien, Atkins et al. "European Society of Hypertension International Protocol revision 2010 for the validation of blood pressure measuring devices in adults." Blood Pressure Monitoring 2010, 15:23–38
Name for the parcelable intent extra containing a data source. It can be extracted using
extract(Intent)
.
Type constant for a data source which exposes data which is derived from one or more existing data sources by performing transformations on the original data.
Type constant for a data source which exposes original, raw data from an external source such as a hardware sensor, a wearable device, or user input.
Parameters | |
---|---|
that |
Object
|
Returns | |
---|---|
boolean |
Extracts the data source extra from the given intent, such as an intent to view user's data.
Parameters | |
---|---|
intent |
Intent
|
Returns | |
---|---|
DataSource |
the data source, or null if not found
|
Returns the package name for the application responsible for setting the data, or null
if unset/unknown. The PackageManager
can be used to query relevant data on the
application, such as the name, icon, logo, etc.
Data coming from local sensors or BLE devices will not have a corresponding application.
Returns | |
---|---|
String |
Returns a list of data quality standards adhered to by this data source. Possible values
include all constants in this class prefixed with DATA_QUALITY_
.
Returns | |
---|---|
int[] |
Returns the data type for data coming from this data source. Knowing the type of data source can be useful to perform transformations on top of raw data without using sources that are themselves computed by transforming raw data.
Returns | |
---|---|
DataType |
Returns the device where data is being collected, or null
if unset.
Returns | |
---|---|
Device |
Returns a unique identifier for the data stream produced by this data source. The identifier includes:
Returns | |
---|---|
String |
Returns the specific name
for the stream coming form this
data source, or null
if unset.
Returns | |
---|---|
String |
Returns the constant describing the type of this data source.
Returns | |
---|---|
int |
one of the constant values (TYPE_DERIVED or TYPE_RAW ),
zero if unset. Values outside of this range should be treated as unset/unknown.
|
Returns | |
---|---|
int |
Returns | |
---|---|
String |
Parameters | |
---|---|
parcel |
Parcel
|
flags |
int
|