Skip to content

Namespace: notifications

Enumerations

Type aliases

ScheduleOptions

Ƭ ScheduleOptions: Object

Options to pass to schedule.

Type declaration

Name Type Description
badge? string Android-only badge image displayed in the notification bubble.
body? string Text displayed in the body (subtitle) of the notification bubble.
delay? number How many milliseconds from now to send this notification.
icon? string Icon image displayed in the notification bubble.
image? string Banner image displayed in the notification bubble.
link? string The link to open when the player engages with the notification.
smsText? string The SMS message text. You should prefix this with the name of your game, so players know who the random phone number texting them is. Eg: "Beadle: New puzzle available!"
title? string Text displayed in the title of the notification bubble.

Defined in

notifications.ts:42

Functions

getPermissionState

getPermissionState(): Promise<PermissionState>

Returns

Promise<PermissionState>

Defined in

notifications.ts:71


requestPermission

requestPermission(): Promise<boolean>

Returns

Promise<boolean>

Defined in

notifications.ts:92


schedule

schedule(tag, opts?): void

Schedules a push notification.

Only one notification with a given tag can be scheduled at a time. If another notification was previously scheduled with the given tag, the entire notification is replaced with the new one.

Parameters

Name Type Description
tag string -
opts? ScheduleOptions Options for configuring display and delivery of the notification.

Returns

void

Defined in

notifications.ts:120