Skip to content

Shortcut (add to home screen)

FRVR.shortcut prompts the user to create a home‑screen shortcut to the game. The exact flow varies: a one‑tap confirm on Android Chrome, a beforeinstallprompt PWA banner on other browsers, or a completely different UX on messaging‑app channels.

if (await FRVR.shortcut.canCreateShortcut()) {
  showAddToHomeScreenButton();
}

Don’t show a button unless canCreateShortcut() is true — the call is a no‑op on channels that don’t support it.

try {
  await FRVR.shortcut.createShortcut();
  analytics.tag('shortcut_created');
} catch (err) {
  // err.code tells you why: user dismissed, already installed, etc.
}

Most browsers require this to be called from a user gesture (click / tap). Call it from a button’s event handler; don’t trigger it from a timer.

Shortcut: can + create

loading SDK…