Builder
class Builder
| kotlin.Any | |
| ↳ | android.health.connect.datatypes.Device.Builder |
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| Device |
build()Build and return |
| Device.Builder |
setDisplayName(displayName: String?)Sets an optional display name for the device |
| Device.Builder |
setManufacturer(manufacturer: String?)Sets an optional client supplied manufacturer of the device |
| Device.Builder |
Sets an optional client supplied model of the device |
| Device.Builder |
Sets an optional client supplied type of the device |
| Device.Builder |
Sets an optional client supplied UDI (Unique Device Identifier), a unique numeric or alphanumeric code assigned to a medical device, for this |
Public constructors
Public methods
setDisplayName
fun setDisplayName(displayName: String?): Device.Builder
Sets an optional display name for the device
| Parameters | |
|---|---|
displayName |
String?: This value may be null. |
| Return | |
|---|---|
Device.Builder |
This value cannot be null. |
setManufacturer
fun setManufacturer(manufacturer: String?): Device.Builder
Sets an optional client supplied manufacturer of the device
| Parameters | |
|---|---|
manufacturer |
String?: This value may be null. |
| Return | |
|---|---|
Device.Builder |
This value cannot be null. |
setModel
fun setModel(model: String?): Device.Builder
Sets an optional client supplied model of the device
| Parameters | |
|---|---|
model |
String?: This value may be null. |
| Return | |
|---|---|
Device.Builder |
This value cannot be null. |
setType
fun setType(type: Int): Device.Builder
Sets an optional client supplied type of the device
| Return | |
|---|---|
Device.Builder |
This value cannot be null. |
setUdi
fun setUdi(udi: String?): Device.Builder
Sets an optional client supplied UDI (Unique Device Identifier), a unique numeric or alphanumeric code assigned to a medical device, for this Device instance.
A device receives a UDI from an accredited issuing agency (e.g. from GS1) which is then registered in multiple regulatory databases (e.g. FDA). The UDI is a unique, globally recognized identifier assigned to a specific device model. An accredited issuing agency, like GS1, provides the global standards used to create the UDI codes. The manufacturers must submit the UDI provided by GS1 to the relevant regulatory databases for each market they operate in.
- In the US, this is the FDA’s Global Unique Device Identification Database (GUDID).
- In the EU, it is the European Database on Medical Devices (EUDAMED).
The calling package needs to declare HealthPermissions#WRITE_DEVICE_UDI in manifest to be able to set UDI for any record. SecurityException is thrown when upserting a record with UDI without the permission.
| Parameters | |
|---|---|
udi |
String?: This value may be null. |
| Return | |
|---|---|
Device.Builder |
This value cannot be null. |