Host UI
FRVR’s native app wrappers (Google Play, iOS, Samsung Galaxy Store) can render a titlebar around the game, holding the privacy and consent entry and the login or account menu. FRVR.hostUI.titlebar reports where that bar is and lets the game hide it.
FRVR.hostUI is always set once the SDK has initialised. On hosts with no titlebar it reports supported: false, so no guard is needed.
Read the titlebar state
Section titled “Read the titlebar state”| Field | Meaning |
|---|---|
supported | The host can render a titlebar. false on hosts without one. |
visible | The titlebar is showing. |
mode | How it is drawn: dedicated (a bar above the game), cutout (inside the notch or punch‑hole band), rail (a vertical rail beside the game in landscape), rail-cutout (a rail inside the side cutout). Hosts may add more. |
edge | The screen edge it sits on: top, left, or right. |
height / width | Size in CSS pixels. 0 when hidden. |
consumesGameSpace | Whether it takes room from the game (dedicated and rail do). |
The game’s viewport is already reduced by the titlebar. Don’t offset your layout for it. The size fields are there for games that want to align something with the bar.
getLastState() returns the last known state synchronously (supported: false until the host has answered), and getHeight() returns the last known height.
React to changes
Section titled “React to changes”Rotating the device can turn a top bar into a side rail:
Hide the titlebar
Section titled “Hide the titlebar”A game that draws its own login, account, and privacy buttons can hide the host’s:
setVisible() resolves with whether the bar is visible afterwards, which is always false on hosts without one.
To hide it before the game shows at all, set FRVR.config.host.titlebar = false. FRVR normally sets this per channel in the generated config.
API summary
Section titled “API summary”| Method | Purpose |
|---|---|
titlebar.getState() | Current state, once the host has answered. |
titlebar.getLastState() | Last known state, synchronously. |
titlebar.getHeight() | Last known height in CSS pixels. |
titlebar.setVisible(visible) | Show or hide the bar. Resolves with the resulting visibility. |
titlebar.onChange(fn) | Call fn(state) when the bar is shown, hidden, resized, or moved. Returns a function that removes the listener. |