Displaying a Toast Message
Function
This API is used to display a toast message.
Function Prototype
showToast(toastInfo: ToastInfo, onShowToastResult?: (ret: SDKERR, reason: string) => void): voidshowToast(toastInfo: ToastInfo, onShowToastResult?: (ret: SDKERR, reason: string) => void): void
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
toastInfo | Yes | ToastInfo | Toast message. |
onShowToastResult | Yes | (ret: SDKERR, reason: string) => void | Callback of displaying a toast message. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
content | Yes | string | Toast message. |
duration | Yes | number | Display duration, in seconds. |
Return Values
void
Callback Method Parameters
(ret: SDKERR, reason: string) => void
Parameter | Type | Description |
---|---|---|
ret | For details about SDKERR, see Error Code Reference. | Error code. |
reason | string | Error description. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot