showToast
Show a toast message.
Declaration
java
void showToast(SUDOPCommonStateHandle handle, SUDOPShowToastParams params);This is a host callback on SUDOPWrappedClient. Register the implementation with registerWrappedClient. Perform the operation and report success or failure once through the SDK-supplied handle. Perform view and window operations on the Android main thread.
SUDOPShowToastParams
| Field | Type | Description |
|---|---|---|
title | String | Message; wrap to available width without truncating by character count, including icon mode |
icon | String | success, error, loading, or none |
image | String | Local custom icon path; takes precedence over icon |
duration | int | Display duration in milliseconds |
mask | boolean | Whether to block touch events |
Result
Call handle.success(dataJson) on success or handle.failure(retCode, retMsg) on failure, with a nonzero error code.
No result data is required on success; call handle.success(null).
Handle type: global.sud.op.runtime.client.SUDOPCommonStateHandle。
The parameter type is in global.sud.op.runtime.core.model.
