FirebaseInAppMessagingDisplay

The SDK's default message UI, as the Android display SDK's com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay. It is set up automatically, and renders every message unless FirebaseInAppMessaging.setMessageDisplayComponent sets another component.

  • Android: the display SDK (firebase-inappmessaging-display), which binds its component whenever an activity resumes. Its Application.ActivityLifecycleCallbacks members are not mirrored.

  • iOS: the iOS SDK's default UI. Pass getInstance to FirebaseInAppMessaging.setMessageDisplayComponent to bring it back after another component, or call displayMessage from a custom component to show a message with it.

  • tvOS: the iOS SDK has no default UI there, so displayMessage reports an error.

  • JVM: nothing is ever displayed.

Get it with getInstance or Firebase.inAppMessagingDisplay.

The iOS SDK's default UI, FIRIAMDefaultDisplayImpl, which the iOS SDK sets as the display component when the app is configured. The class is not in the iOS SDK's public headers, so it is looked up by name; it exists on iOS only.

The SDK's default message UI, as the Android display SDK's com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay. It is set up automatically, and renders every message unless FirebaseInAppMessaging.setMessageDisplayComponent sets another component.

  • Android: the display SDK (firebase-inappmessaging-display), which binds its component whenever an activity resumes. Its Application.ActivityLifecycleCallbacks members are not mirrored.

  • iOS: the iOS SDK's default UI. Pass getInstance to FirebaseInAppMessaging.setMessageDisplayComponent to bring it back after another component, or call displayMessage from a custom component to show a message with it.

  • tvOS: the iOS SDK has no default UI there, so displayMessage reports an error.

  • JVM: nothing is ever displayed.

Get it with getInstance or Firebase.inAppMessagingDisplay.

firebase-java-sdk has no In-App Messaging, so the JVM has no message UI and nothing is ever displayed.

Types

Link copied to clipboard
actual object Companion
actual object Companion
expect object Companion
actual object Companion

Properties

Link copied to clipboard
val ios: FIRInAppMessagingDisplayProtocol?

The iOS SDK's default display component; null on tvOS, which has no default UI.

Functions

Link copied to clipboard
actual open override fun displayMessage(inAppMessage: InAppMessage, callbacks: FirebaseInAppMessagingDisplayCallbacks)

Renders inAppMessage, reporting what happens to it through callbacks: the impression, a click on one of its actions, its dismissal, or the error that kept it from being displayed. Until one of those is reported the SDK considers the message on screen and displays no other.

actual open override fun displayMessage(inAppMessage: InAppMessage, callbacks: FirebaseInAppMessagingDisplayCallbacks)

Renders the message with the iOS SDK's default UI, which reports to callbacks on the main thread. Reports InAppMessagingErrorReason.UNSPECIFIED_RENDER_ERROR instead on tvOS, which has no default UI.

expect open override fun displayMessage(inAppMessage: InAppMessage, callbacks: FirebaseInAppMessagingDisplayCallbacks)

Displays inAppMessage with the default UI, reporting to callbacks.

actual open override fun displayMessage(inAppMessage: InAppMessage, callbacks: FirebaseInAppMessagingDisplayCallbacks)

Does nothing: there is no message UI on the JVM.

Link copied to clipboard
open override fun toString(): String
open override fun toString(): String