com.samsung.android.sdk.healthdata
Class HealthDevice
- java.lang.Object
-
- com.samsung.android.sdk.healthdata.HealthDevice
-
- All Implemented Interfaces:
- Parcelable
public final class HealthDevice extends Object implements Parcelable
This class represents device information that provides health data. It is used to identify the data source for eachHealthData
.- Since:
- 1.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
HealthDevice.Builder
This class is a builder to configureHealthDevice
.
-
Field Summary
Fields Modifier and Type Field and Description static int
GROUP_COMPANION
Group for companion or a watch device.static int
GROUP_EXTERNAL
Group for external peripheral device.static int
GROUP_MOBILE
Group for mobile device.static int
GROUP_UNKNOWN
Unknown device group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(Object o)
Checks if this instance and the given object indicate the same device.String
getCustomName()
Gets a custom name given to the device.int
getGroup()
Gets the group of the device.String
getManufacturer()
Gets a manufacturer of the device.String
getModel()
Gets a model name of the device.String
getUuid()
Gets a unique ID of the device.int
hashCode()
Returns a hash code value for this instance.
-
-
-
Field Detail
-
GROUP_UNKNOWN
public static final int GROUP_UNKNOWN
Unknown device group.
Its constant value is0
.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
GROUP_MOBILE
public static final int GROUP_MOBILE
Group for mobile device.
Its constant value is360001
.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
GROUP_EXTERNAL
public static final int GROUP_EXTERNAL
Group for external peripheral device.
Its constant value is360002
.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
GROUP_COMPANION
public static final int GROUP_COMPANION
Group for companion or a watch device.
Its constant value is360003
.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
equals
public boolean equals(Object o)
Checks if this instance and the given object indicate the same device. In other to be equal,obj
must an instance ofHealthDevice
and each seed information must be equal.- Overrides:
equals
in classObject
- Parameters:
o
- TheHealthDevice
object to compare this instance with- Returns:
true
if the given object indicates the same device with this instance, orfalse
- See Also:
hashCode()
-
hashCode
public int hashCode()
Returns a hash code value for this instance.
Ifequals(Object)
returnstrue
for two objects, their hash code values are same.- Overrides:
hashCode
in classObject
- Returns:
- The hash code value for this instance
- See Also:
equals(Object)
-
getCustomName
public String getCustomName()
Gets a custom name given to the device.- Returns:
- The custom name, or
null
- Since:
- 1.0.0
-
getModel
public String getModel()
Gets a model name of the device.- Returns:
- The module name, or
null
- Since:
- 1.0.0
-
getManufacturer
public String getManufacturer()
Gets a manufacturer of the device.- Returns:
- The manufacturer, or
null
- Since:
- 1.0.0
-
getUuid
public String getUuid()
Gets a unique ID of the device. The ID is generated from the seed information when the device is registered.- Returns:
- The unique ID of the device, or
null
if the device is not registered - Since:
- 1.0.0
-
getGroup
public int getGroup()
Gets the group of the device.- Returns:
- The group information with one of the following values.
- Since:
- 1.0.0
-
-