Skip to main content

Push notifications

Flyy sends notifications through Firebase Cloud Messaging on both platforms. Push is optional — skip this page if you don't use it.

Push carries three things:

  1. Notifications — reward won, new offer, reminders. Shown in the tray and/or as an in-app popup.
  2. Popups — reward and scratch-card popups over your app.
  3. Silent config refreshes — flyy_type: config_refresh, sent when GameStudio publishes, so placement changes reach running apps.

Option A — Flyy is your only push source​

AndroidManifest.xml
<service android:name="com.theflyy.sdk.push.FlyyMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

Option B — you already have a messaging service​

class MyMessagingService : FirebaseMessagingService() {
override fun onNewToken(token: String) {
Flyy.syncPushToken(token)
}

override fun onMessageReceived(message: RemoteMessage) {
if (Flyy.handlePush(message.data)) return // Flyy's message — handled
// …your own notifications
}
}

handlePush returns true for Flyy notifications, config refreshes and any other Flyy message type, and false for yours.

Good to know​

  • Android 13+: your app must request POST_NOTIFICATIONS. Without it the tray copy is dropped; in-app popups still show while the app is open.
  • Icon: set FCM's com.google.firebase.messaging.default_notification_icon meta-data. The SDK uses it too.
  • Background taps: a notification the system drew while the app was in the background is still handled when tapped — the click is reported and the deep link opens. No code needed.
  • Token timing: a token synced before init is held and sent at init. Identify and login re-fetch the token, so older installs register too.

Config-refresh topic​

When Firebase is present, the SDK subscribes the install to flyy_cfg_<partnerId> (flyy_cfg_stage_<partnerId> on stage). One push to that topic refreshes every install after a GameStudio publish. To opt out, set subscribeConfigTopic = false. Without Firebase, changes arrive on the next foreground.