Skip to main content

Native calls JS functions (CallJS)

[Player Network SDK & MSDK] Interface for interaction between native and web JS.

Supported Platforms

Supports Android, iOS, Windows platform.
note

MSDK does not support Windows for now.

Function Definition

void CallJS(string jsonJsParam);

Input Parameters

ParametersTypeDescription
jsonJsParamstringJSON format string

Callback Handling

The callback handling interface is GUAWebViewResultObserver.The callback data structure is GUAWebViewRet.

The callback event is WebViewRetEvents. Callback ID is GUA_WEBVIEW_JS_CALL.

Code Example

UnionAdapterAPI.GetWebViewService().CallJS("jsonJsParam");