Skip to main content
Playtolia Push uses Firebase Cloud Messaging (FCM) to send notifications across Android and iOS: transaction confirmations, social updates (friend requests, party invites), and marketing messages.

Requirements

Push is the only feature of the SDK that depends on Firebase. If you do not use push, Firebase is not necessary. The other parts of the SDK compile and run without it.

Enable Playtolia Push

Go to Edit → Project Settings → Playtolia → Features. Then enable Push Notifications. The changes take effect with the next build.
When you enable Push, the SDK adds the PLAYTOLIA_FIREBASE scripting define. This define compiles in the Firebase integration of the SDK. Make sure that the Firebase Unity SDK (with Cloud Messaging) and your Google config files are already in the project. When you disable Push, the SDK deletes the define and compiles Firebase out again. You do not have to change this define manually, because the toggle controls it.

Notification permission

Android 13+ and iOS require explicit permission. Select a strategy under Playtolia → Features:
The user experience is better if you request the notification permission after the player finds some value in the game. A good moment is after a tutorial or after the first session, not immediately at the app start.
On Android 13+ the request is for POST_NOTIFICATIONS. The SDK asks for it but does not declare it; the Firebase Cloud Messaging package normally does. If the dialog never appears, add the permission to your game’s manifest. The SDK does not use exact alarms, so it needs no Play Console exact-alarm declaration. See Permissions for the full list.

Requesting permission manually (Custom strategy)

Reading the permission status

Registering a push token

After Firebase initializes and gives a token, send that token to Playtolia. The backend can then target this device:

Opening notification settings

This method opens the OS notification settings of your app. It is useful if the player denied the permission before:

Reading state

Listening to changes

SDK Reference

PlaytoliaNotifications reference

Promotions

App review prompts