java.lang.Object | |
↳ | com.google.android.gms.fitness.data.Device |
Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
Each sensor is exposed as a DataSource
.
The main purpose of the Device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including:
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TYPE_CHEST_STRAP | Constant indicating the device is a chest strap. | |||||||||
int | TYPE_PHONE | Constant indicating the device is an Android phone. | |||||||||
int | TYPE_SCALE | Constant indicating the device is a scale or similar device the user steps on. | |||||||||
int | TYPE_TABLET | Constant indicating the device is an Android tablet. | |||||||||
int | TYPE_UNKNOWN | Constant indicating the device type is not known. | |||||||||
int | TYPE_WATCH | Constant indicating the device is a watch or other wrist-mounted band. |
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new device.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the Device representation of the local device, which can be used when defining local
data sources.
| |||||||||||
Returns the manufacturer of the product/hardware.
| |||||||||||
Returns the end-user-visible model name for the device.
| |||||||||||
Returns the constant representing the type of the device.
| |||||||||||
Returns the serial number or other unique ID for the hardware
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||
![]() |
Constant indicating the device is a chest strap.
Constant indicating the device is an Android phone.
Constant indicating the device is a scale or similar device the user steps on.
Constant indicating the device is an Android tablet.
Constant indicating the device type is not known.
Constant indicating the device is a watch or other wrist-mounted band.
Creates a new device.
manufacturer | the manufacturer of the product/hardware |
---|---|
model | the end-user-visible name for the end product |
uid | a serial number or other unique identifier for the particular device hardware |
type | the type of device. One of the type constants. |
Returns the Device representation of the local device, which can be used when defining local data sources.
Returns the manufacturer of the product/hardware.
Returns the end-user-visible model name for the device.
Returns the constant representing the type of the device. This will usually be one of the
values from the type constants in this class, but it's not required to be. Any other value
should be treated as TYPE_UNKNOWN
.
Returns the serial number or other unique ID for the hardware