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 it also closes with the back button, which is reported as dismissed too.

Platform differences​

iOSAndroidFlutter
Message received in the backgroundShown the next time the app becomes active, within 6 hours. Only the newest is kept.Shown the next time the app is opened, within 6 hours, also after the app was closed. Only the newest is kept.Not shown
Where it is shownA separate window above your appA layer over the current screen that follows your navigationA dialog in your widget tree
"Displayed" reportedWhen the message is on screenWhen the user can see the messageWhen the SDK starts showing it
Link of a buttonYour inAppMessageClickHandler first, then the SDK opens itYour inAppMessageClickHandler first, then the SDK opens it in Custom Tabs or with a view intentYour onTap callback
Click countedAlwaysAlwaysNot for a button without a link
Closes after a button tapYesYesNo
Custom fontsfontResolverfontResolverNo 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.