Skip to content

AndroidBrowser

Opens URLs in the in-app browser.

Kodster.InAppWebBrowser.Android.AndroidBrowser

Overview

  • Initialization is handled automatically during plugin startup.
  • Cleanup is registered automatically on Application.quitting.
  • On non-Android platforms, initialization is skipped and calls are ignored (IsEphemeralBrowsingSupported remains false).

Properties

IsEphemeralBrowsingSupported

public static bool IsEphemeralBrowsingSupported { get; }

Whether ephemeral browsing is supported by the user's current default browser.

Returns

  • true if supported; otherwise false.

Remarks

  • Requires androidx.browser version 1.9.0 or higher.

Methods

Open

public static void Open(
    string url,
    AndroidBrowserOptions options = null
)

Opens url in the in-app browser.

Parameters

  • url (string): The URL to open.
  • options (AndroidBrowserOptions, optional): Browser configuration. When null, defaults are used.

Throws

  • ArgumentException: Thrown when url is null, empty, whitespace, or not a valid absolute http/https URL.

PrefetchUrl

public static void PrefetchUrl(string url)

Prefetches the specified URL in the background to speed up a launch.

Parameters

  • url (string): The URL to prefetch.

Throws

  • ArgumentException: Thrown when url is null, empty, whitespace, or not a valid absolute http/https URL.