Quick In-App Browser


Browser.Prewarm to warm the browser process before the player taps ... The package ... Android 12L and Chrome 107 or newer, and drops to full screen in landscape and in ... every version.


by Krykftn | Advanced Editor Tools & Systems


Price History +

Open a web page in a sheet over your running game. On iOS and Android the app is never backgrounded and the scene is never reloaded, so the player comes back exactly where they were.

Features:

• One static entry point: Browser.Open, Close, IsOpen, IsSupported, Prewarm

• Events OnOpened, OnClosed and OnFailed, all raised on the Unity main thread

• BrowserOptions with height ratio, resizability, toolbar and text colour, page title, share button,

iOS dismiss wording, bar collapsing, ephemeral session and external fallback, each with a chainable setter

• iOS: SFSafariViewController as a sheet, custom detent on iOS 16+, medium and large detents on iOS 15

• iOS: both dismissal paths raise OnClosed, the Done button and dragging the sheet down

• Android: Chrome Custom Tabs with Partial Custom Tab, corner radius, colour scheme params, warm-up

• Android: close detection combines the tab hidden event with the host activity resuming, so leaving

and returning to the app does not fire a false close

• Android package visibility queries entry shipped in the plugin manifest

• iOS post-process build step links SafariServices.framework

• Editor, Standalone and WebGL fall back to Application.OpenURL with IsSupported false

• No Unity package dependencies; Android backend gated on com.unity.modules.androidjni

Supported OS: iOS 13+, iPadOS, visionOS, Android 5.0+ (API 21)

Documentation: Documentation/README.md inside the package

Your support page, your terms, your patch notes. Today Unity has one way to show any of them, and it

is the one a game does not want: `Application.OpenURL` pushes your app to the background and brings

Safari or Chrome forward as a separate app. On a mid-range Android device coming back can mean an

app restart. Even when it does not, the music stops, the session breaks, and a two-line privacy

policy costs the player their place in the game.


This package opens the same page in a sheet that slides up over the running game.


WHAT YOU GET


• One line of code: Browser.Open("https://example.com/support")


• iOS uses SFSafariViewController presented as a modal inside your own app. The process is never

backgrounded, OnApplicationPause is never raised, audio keeps playing and the game loop keeps

running behind the sheet


• Android uses a Chrome Custom Tab, shown as a partial sheet where the platform supports it


• Real browser behaviour you do not have to maintain: cookies, saved passwords, reader mode, share,

and the address bar that shows the player which site they are actually on


THE SHEET IS YOURS TO SHAPE


• Height as a fraction of the screen, from a third of the screen up to full screen


• Draggable up to full screen, or fixed where you set it


• Toolbar colour and text colour, page title on or off, share button on or off


• iOS dismiss wording: Done, Close or Cancel


• Bar collapsing while the user scrolls, and an isolated no-cookie session when you need one


EVENTS AND STATE


• OnOpened, OnClosed and OnFailed, all raised on the Unity main thread


• Browser.IsOpen so your own pause handling can tell the browser sheet apart from the player

leaving, and Browser.IsSupported so you know what the device can do before you ask


• Browser.Prewarm to warm the browser process before the player taps


HONEST ABOUT THE PLATFORMS


On iOS the sheet is a modal inside your app and nothing pauses. On Android a Custom Tab is a

separate Activity in the same task, so a full-screen tab does raise OnApplicationPause. The package

says so, gives you the flag to handle it, and the read-me carries the table. The partial sheet needs

Android 12L and Chrome 107 or newer, and drops to full screen in landscape and in multi-window on

every version. That is platform behaviour, not a bug, and the code accepts it silently instead of

pretending otherwise.


CLEAN AND SAFE


• No Unity package dependencies. The Android backend is gated on the Android JNI module and

compiles without it


• Namespaced code (Krykftn.QuickInAppBrowser) in its own assemblies, editor code editor-only


• The Android package visibility entry ships in the plugin's own manifest, so the Custom Tabs

service is actually found on Android 11 and newer


• SafariServices.framework is linked by a post-process build step, so iOS needs no setup at all


• Editor, desktop and WebGL compile and run, falling back to Application.OpenURL


REQUIREMENTS


• Unity 2022.3 LTS or newer


• iOS 13+, Android 5.0+ (API 21)


• Android needs androidx.browser 1.8.0. There is an External Dependency Manager manifest for projects that

have EDM4U, and a one-line manual alternative for projects that do not


HONEST LIMITS


The partial sheet is a request, not a guarantee: below Android 12L, below Chrome 107, in landscape

and in multi-window the same call opens a full-screen tab. On iOS 13 and 14 there are no detents, so

the height ratio is ignored and the system page sheet height is used. Prewarm is an Android-only

API and is a no-op on iOS rather than a lie.