FirebaseInAppMessaging

Firebase In-App Messaging: displays the messages of the campaigns created in the Firebase console, with the SDK's default UI or a component set with setMessageDisplayComponent, and reports what the user does with them as flows.

The messages, their actions and the display callbacks are the types of the com.google.firebase.inappmessaging layer, such as InAppMessage and Action. See CompatFirebaseInAppMessaging for the platform differences: on the JVM no message is ever displayed.

Properties

Link copied to clipboard

The underlying Firebase Android SDK object.

Link copied to clipboard

The clicks on the actions of messages, while collected.

Link copied to clipboard
Link copied to clipboard

The messages dismissed, by the user or automatically, while collected; see clicks.

Link copied to clipboard

The messages that could not be displayed, while collected; see clicks.

Link copied to clipboard

The messages displayed long enough to count as an impression, while collected; see clicks.

Link copied to clipboard
val FirebaseInAppMessaging.ios: FIRInAppMessaging

The underlying Firebase iOS SDK object.

Link copied to clipboard

Whether automatic data collection is enabled: the SDK fetches messages and reports their impressions and clicks only when it is. Setting it persists across app restarts and overrides the manifest (Info.plist on Apple platforms) and the Firebase-wide setting.

Link copied to clipboard

Whether the display of messages is suppressed, until it is set to false again or the app restarts. On Android only the display SDK honours it, so a custom display component should check it; the iOS SDK displays no message while it is set.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Sets isAutomaticDataCollectionEnabled, or with null clears the override on Android, so that the manifest and then the Firebase-wide setting apply again. The iOS SDK has no override to clear: on Apple platforms null leaves the setting unchanged.

Link copied to clipboard

Renders the messages with messageDisplay in place of the default UI, or with null displays no message at all. The default UI is com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay; see CompatFirebaseInAppMessaging.setMessageDisplayComponent for what a component has to do, and why on Android it only stays in place without the display SDK.

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

Triggers the campaigns whose trigger is the analytics event eventName, as if the event had been logged, and displays the first one that is due.