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

Player Network supports the use of the WebView feature on the following platforms:
Callbacks
- Unity
- Unreal Engine
| API | Function Definition |
|---|---|
| AddWebViewResultObserver | Register the callback for the Player Network SDK WebView module WebViewResult.Used to handle callbacks for interfaces such as OpenUrl. |
| RemoveWebViewResultObserver | Remove the callback for WebViewResult. |
| API | Function Definition |
|---|---|
| SetWebViewResultObserver | Set the callback for the Player Network SDK WebView module WebViewResult. |
| GetWebViewResultObserver | Get the callback for WebViewResult. |
WebView Functions
- Unity
- Unreal Engine
| API | Function Definition |
|---|---|
| OpenUrl | Open URL |
| GetEncryptUrl | Return encrypted input URL |
| CallJS | Call JS code from native |
| API | Function Definition |
|---|---|
| OpenUrl | Open URL |
| GetEncryptUrl | Return encrypted input URL |
| CallJS | Call JS code from native |