Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
java.lang.Object
|---com.huawei.watch.kit.hiwear.p2p.HiWearMessage.Builder
- public static class HiWearMessage.Builder
- extends java.lang.Object
It is the Internal building class of Message.
It is used to build message objects from the wearable device to the phone.
Constructor and Description |
|---|
Builder() |
Modifier and Type | Method and Description |
|---|---|
build() Indicates the message constructor. | |
setDescription(java.lang.String description) Sets message description. | |
setPayload(byte[] data) Sets byte data. | |
setPayload(java.io.File file) Sets file data. |
Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public Builder()
public HiWearMessage.Builder setPayload(byte[] data)
It is used to set byte data.
Parameters:
Parameter Name | Parameter Description |
|---|---|
data | Data of the byte type. |
Returns:
Builder object.
public HiWearMessage.Builder setPayload(java.io.File file)
It is used to set file data.
Parameters:
Parameter Name | Parameter Description |
|---|---|
file | Data of the file type. |
Returns:
Builder object.
public HiWearMessage.Builder setDescription(java.lang.String description)
It is used to set the description.
Parameters:
Parameter Name | Parameter Description |
|---|---|
description | Description. |
Returns:
Builder object.