AndroidWebView

class : MonoBehaviour, IWebView

The Android IWebView implementation, which includes static methods for Android-specific functionality.

Summary

Public methods

ClearHistory

void ClearHistory()

Clears the webview's back / forward navigation history.

GloballyUseAlternativeInputEventSystem

static void GloballyUseAlternativeInputEventSystem(bool useAlternativeInputEventSystem)

Some standalone VR systems (like Oculus Go and the Mirage Solo) use a version of Android where the primary system used for dispatching mouse and keyboard events stops working after a while. If you're running on one of those platforms, you can call this method to make webviews use an alternative input event system that doesn't stop working after a while. The tradeoff is that this alternative input event system doesn't handle mouse and keyboard events as accurately as the primary method does (e.g. scrolling in some elements may not work as expected).

PauseAll

static void PauseAll()

Pauses processing, media, and rendering for all webview instances. This method is automatically called by the plugin when the application is paused.

ResumeAll

static void ResumeAll()

Resumes processing and rendering for all webview instances after a previous call to PauseAll(). This method is automatically called by the plugin when the application resumes after being paused.

SetMediaPlaybackRequiresUserGesture

void SetMediaPlaybackRequiresUserGesture(bool mediaPlaybackRequiresUserGesture)

By default, AndroidWebView prevents JavaScript from auto-playing sound from most sites unless the user has first interacted with the page. You can call this method to disable or re-enable enforcement of this auto-play policy.