For the complete documentation index, see llms.txt. This page is also available as Markdown.

Notifications

You are reading the documentation for Bridge SDK v2. If you need the obsolete v1 documentation, see Documentation (v1).

Schedule notifications that the host platform shows after the player leaves the game. Use them to bring players back: a daily energy refill, an expiring bonus, "your building is ready".

Implementation order

  1. Required — Map every notification id to its platform value in the config under notifications.

  2. Recommended — Check isSupported before showing any notification-related UI.

  3. Recommended — schedule() a re-engagement notification at a natural moment (level completed, energy spent, session about to end).

  4. Recommended — On launch, read platform.payload to find out whether the game was opened from a notification, and route the player accordingly.

Configuration

The game always works with its own notification id. Platforms that need their own identifier get it from the notifications section of the config:

{
    "notifications": [
        {
            "id": "come_back",  // the id you pass to schedule() / cancel()
            "msn": 1            // MSN notification type — an integer from 0 to 15
        },
        {
            "id": "energy_full",
            "msn": 2
        }
    ]
}

Automatic re-engagement notifications

On MSN, Bridge schedules three re-engagement notifications right after initialization — shown no earlier than 1 day, 3 days, and 7 days after the session. They require no code and occupy MSN types 8, 9, and 10, which is why those types are rejected for your own notifications.

To replace them with your own, turn them off in the config:

Is Supported

Check support before showing notification-related UI (an opt-in toggle, a "remind me" button).

Use the Is Notifications Supported condition.

Use the Is Notifications Supported condition.

Platform support · 1 of 25 platforms

Supports: msn

Does not support: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Schedule

Schedules a notification. The platform shows it after the player has left the game, no earlier than delaySeconds from now.

Build the notification with the common Add Action Parameter actions (id, title, description, delaySeconds, image, callToAction, payload), then run Notifications Schedule and handle the On Notifications Schedule Completed trigger.

Copy This Example

Build the notification with the common Add Action Parameter actions (id, title, description, delaySeconds, image, callToAction, payload), then run Notifications Schedule and handle the On Notifications Schedule Completed condition.

Copy This Example

Notification fields

Field
Type
Required
Description

id

string

yes

Game-level id, mapped to the platform value in the config.

title

string

yes

Notification headline. MSN: up to 60 characters.

description

string

yes

Notification body. MSN: up to 200 characters.

delaySeconds

integer

no

Minimum delay before the notification may be shown. MSN: up to 604800 (7 days).

image

string

no

Image for the notification. MSN expects base64 image data.

callToAction

string

no

Label of the notification button.

payload

string

no

Arbitrary string returned through platform.payload when the game is launched from this notification.

Cancel

Cancels a previously scheduled notification by its game-level id.

Call the Notifications Cancel action with the notification id, then handle the On Notifications Cancel Completed trigger.

Copy This Example

Call the Notifications Cancel action with the notification id, then handle the On Notifications Cancel Completed condition.

Copy This Example

Cancel All

Cancels every notification scheduled by the game. Same platform limitation as Cancel.

Call the Notifications Cancel All action, then handle the On Notifications Cancel All Completed trigger.

Call the Notifications Cancel All action, then handle the On Notifications Cancel All Completed condition.

Handling the launch payload

When the player opens the game from a notification, the notification's payload arrives as the regular platform payload. There is no separate notifications API for it — read platform.payload after initialization.

On System → On start of layout, compare the PlaygamaBridge.PlatformPayload expression with the payload you scheduled.

Copy This Example

Once Is Initialized is true, compare the PlaygamaBridge::PlatformPayload() expression with the payload you scheduled.

Copy This Example

Last updated