Skip to content

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 ​

FieldTypeDescription
titleStringMessage; wrap to available width without truncating by character count, including icon mode
iconStringsuccess, error, loading, or none
imageStringLocal custom icon path; takes precedence over icon
durationintDisplay duration in milliseconds
maskbooleanWhether 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.