Skip to main content

WebView Overview

The WebView interface uses the WebView component of the Player Network SDK or the native system browser to open specific web pages within the game, suitable for Android, iOS, and PC platforms.The WebView interface transmits OpenID and token to the server, thereby linking the Player Network account service to the opened web page.WebView can be used to open online questionnaires, marketing campaign pages, H5 player communities within the game, and so on.

The WebView interface uses the system's WebView component with mutual calls between JS and native.

The application scenarios of the WebView module include but are not limited to:

  • Web-based survey
  • Marketing activity page
  • H5 player community

Image: ToolsSampleDeepLink

Player Network supports the use of the WebView feature on the following platforms:

Callbacks

APIFunction Definition
AddWebViewResultObserverRegister the callback for the Player Network SDK WebView module WebViewResult.Used to handle callbacks for interfaces such as OpenUrl.
RemoveWebViewResultObserverRemove the callback for WebViewResult.

WebView Functions

APIFunction Definition
OpenUrlOpen URL
GetEncryptUrlReturn encrypted input URL
CallJSCall JS code from native