Skip to main content

In-App Messages

In-app messages are messages you design in the panel and the SDK shows inside your app, on top of the current screen. They can contain text, images and buttons with links.


What it is​

An in-app message is delivered as a silent (data only) push notification through Firebase Cloud Messaging. The operating system does not show it. The SDK receives it, builds the message from the design in the panel and shows it.

Each message has a layout: top, center, bottom or full screen.


How it works​

Conditions​

  • The same setup as for push notifications: Firebase keys, and an FCM token sent by the device. See Push Notifications.
  • Your app forwards incoming messages to the SDK.
  • The app runs. A silent push does not reach an app that the user closed completely.

Flow​

  1. You send an in-app message from the panel or from an automation.
  2. Positive User sends it through Firebase to the contact's device.
  3. The SDK shows the message and reports it as displayed.
  4. The contact taps a button: the SDK reports a click and passes the link to your code or opens it. On iOS and Android it also closes the message. Exceptions are listed in Platform differences. See also Opening App Screens.
  5. The contact closes the message with its close button: the SDK reports it as dismissed. On Android the message also closes with a tap outside it or with the back button, and then nothing is reported.

Platform differences​

iOSAndroidFlutter
Message received in the backgroundShown the next time the app becomes active, within 6 hours. Only the newest is kept.Not shownNot shown
Where it is shownA separate window above your appA separate activityA dialog in your widget tree
"Displayed" reportedWhen the message is on screenWhen the message is shownWhen the SDK starts showing it
Link of a buttonYour inAppNotificationClickDelegate first, then the SDK opens itYour click handler, or the SDK opens it in Chrome Custom TabsYour onTap callback
Click countedAlwaysNot when a click handler is set, and not for a button without a linkNot for a button without a link
Closes after a button tapYesYesNo
Custom fontsfontResolversetFontResolverNo font resolver. The SDK loads the font named in the panel from Google Fonts. A font that is not available there falls back to your app's default font.

Platform guides​