SDK docs

Mobile Bridge

The game calls one PlayKovo bridge. PlayKovo owns AdMob, app-store configuration, test units, provider IDs, and ad delivery.

New games: use PlayKovoSDK only

Since SDK 2, window.PlayKovoSDK detects the PlayKovo app and routes ads, cloud saves, pause and sound there itself. A new game needs only playkovo-sdk.js. The bridge below stays supported for games already built on it, and it also receives the app's pause, resume, mute and unmute events through on().

What you do and do not install

  • Add the PlayKovo Mobile Bridge script to the mobile-compatible HTML5 build.
  • Call the bridge only when a player deliberately asks for a reward.
  • Grant the reward only after status is rewarded.
  • Do not add AdMob, Google Mobile Ads, AdSense, provider IDs, or provider test IDs to the game.

Why this is separate

AdMob is native-app advertising and runs inside the PlayKovo Android or iOS app. AdSense is web advertising and runs in PlayKovo's web player or page stack. Neither is a developer dependency.

1. Add the bridge

Load this script in the same hosted build you submit for mobile review. It exposes window.PlayKovoMobile; it contains no advertising account credential. The relative URL keeps the bridge and its browser-demo assets on the isolated PlayKovo games origin.

HTML
<head>
  <script src="/sdk/playkovo-mobile-bridge.js" data-playkovo-mobile-bridge="v1"></script>
  <!-- your game scripts follow -->
</head>

2. Request a rewarded ad

Keep the normal gameplay path available. A browser, local desktop run, or a game not enabled for mobile returns unavailable; that is expected behavior, not a reason to grant the reward.

JavaScript
const result = await window.PlayKovoMobile.showRewarded({
  placement: "extra_life",
});

if (result.status === "rewarded") {
  grantExtraLife();
} else {
  showRewardUnavailable();
}

3. Request an interstitial

Use interstitials between levels, after a completed run, or at another natural pause. Do not show one on game launch, during active play, or repeatedly after a declined request.

JavaScript
const result = await window.PlayKovoMobile.showInterstitial({
  placement: "level_complete",
});

if (result.status === "shown") {
  startNextLevel();
} else {
  startNextLevel(); // Never block gameplay on an ad.
}

4. Browser demo and console events

Opening the same build in a normal browser runs the PlayKovo demo video instead of AdMob. It lets you test placement timing, reward gating, skip behavior, and promise results before Mobile QA.

JavaScript
PlayKovo Bridge Mobile SDK successfully initialized!
PlayKovo Mobile Bridge: Interstitial ad called.
PlayKovo Mobile Bridge: Interstitial ad shown.
PlayKovo Mobile Bridge: Rewarded ad rewarded.

window.PlayKovoMobile.on("rewarded:rewarded", () => {
  console.log("Grant the in-game reward here.");
});

Result contract

Rewarded requests return rewarded, cancelled, unavailable, cooldown, or error. Interstitial requests return shown instead of rewarded. The native app, not the game, ultimately enforces eligibility and cooldowns.

5. How mobile testing works

  • Upload the mobile-ready build and opt in to mobile distribution during submission.
  • PlayKovo reviews the mobile rights and the bridge call before enabling the game in the app catalog.
  • PlayKovo runs the game in an Android or iOS debug build using Google's official rewarded test unit.
  • After approval, the production PlayKovo app supplies the real ad unit. The game code does not change.

No self-service provider account

A developer never needs an AdMob account to test a PlayKovo game. Send the game slug and reward placement to PlayKovo support when requesting mobile QA.

We use optional cookies for site analytics and site advertising. You can change your choice later. Privacy policy.