FirebaseInAppMessaging
Firebase In-App Messaging, as the Android SDK's com.google.firebase.inappmessaging.FirebaseInAppMessaging: the headless SDK that fetches the campaigns, decides when a message is due and records its impressions and clicks. A message is rendered by the display component, which is the SDK's default UI unless setMessageDisplayComponent replaces it.
Android: the Android SDK itself. The default UI is the display SDK, which this module depends on (see com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay).
Apple platforms: the iOS SDK's
FIRInAppMessaging. The listeners are fed from itsdelegate, which this class sets when a listener is added (replacing a delegate set on it directly), and setMessageDisplayComponent sets itsmessageDisplayComponent. The iOS SDK has a default UI on iOS only: on tvOS a message is displayed only by a component set here.JVM: firebase-java-sdk has no In-App Messaging, so no message is ever displayed and the members do nothing.
In-App Messaging always belongs to the default com.google.firebase.FirebaseApp: get it with getInstance or Firebase.inAppMessaging.
The iOS SDK's FIRInAppMessaging. There is one instance per FIRInAppMessaging, as the listeners live here: they are fed from its delegate, which this instance sets (and keeps alive, the property being weak) when a listener is added, replacing a delegate set on ios directly.
Firebase In-App Messaging, as the Android SDK's com.google.firebase.inappmessaging.FirebaseInAppMessaging: the headless SDK that fetches the campaigns, decides when a message is due and records its impressions and clicks. A message is rendered by the display component, which is the SDK's default UI unless setMessageDisplayComponent replaces it.
Android: the Android SDK itself. The default UI is the display SDK, which this module depends on (see com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay).
Apple platforms: the iOS SDK's
FIRInAppMessaging. The listeners are fed from itsdelegate, which this class sets when a listener is added (replacing a delegate set on it directly), and setMessageDisplayComponent sets itsmessageDisplayComponent. The iOS SDK has a default UI on iOS only: on tvOS a message is displayed only by a component set here.JVM: firebase-java-sdk has no In-App Messaging, so no message is ever displayed and the members do nothing.
In-App Messaging always belongs to the default com.google.firebase.FirebaseApp: get it with getInstance or Firebase.inAppMessaging.
firebase-java-sdk has no In-App Messaging: no message is ever fetched or displayed on the JVM, so the listeners and the display component are never called, and the settings are only kept in memory.
Types
Properties
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.
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.
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.
Kept in memory: nothing is collected on the JVM.
Functions
Registers clickListener, which is notified when the user clicks an action of a message. Registering the same listener again has no effect. On Android the listener runs on a background thread; on Apple platforms on the thread the iOS SDK reports the click on, the main thread for its default UI.
Registers clickListener, which is notified when the user clicks an action of a message. Registering the same listener again has no effect. On Android the listener runs on a background thread; on Apple platforms on the thread the iOS SDK reports the click on, the main thread for its default UI.
Registers clickListener, which is notified when the user clicks an action of a message. Registering the same listener again has no effect. On Android the listener runs on a background thread; on Apple platforms on the thread the iOS SDK reports the click on, the main thread for its default UI.
Does nothing: no message is displayed on the JVM.
Registers dismissListener, which is notified when a message is dismissed; see addClickListener.
Registers dismissListener, which is notified when a message is dismissed; see addClickListener.
Registers dismissListener, which is notified when a message is dismissed; see addClickListener.
Does nothing: no message is displayed on the JVM.
Registers displayErrorListener, which is notified when a message cannot be displayed; see addClickListener. On Apple platforms the iOS SDK's NSError is mapped onto the closest FirebaseInAppMessagingDisplayCallbacks.InAppMessagingErrorReason: a failed image download is IMAGE_FETCH_ERROR, invalid image data IMAGE_DISPLAY_ERROR, and anything else UNSPECIFIED_RENDER_ERROR; the reason a display component set with setMessageDisplayComponent reports is kept as it is.
Registers displayErrorListener, which is notified when a message cannot be displayed; see addClickListener. On Apple platforms the iOS SDK's NSError is mapped onto the closest FirebaseInAppMessagingDisplayCallbacks.InAppMessagingErrorReason: a failed image download is IMAGE_FETCH_ERROR, invalid image data IMAGE_DISPLAY_ERROR, and anything else UNSPECIFIED_RENDER_ERROR; the reason a display component set with setMessageDisplayComponent reports is kept as it is.
Registers displayErrorListener, which is notified when a message cannot be displayed; see addClickListener. On Apple platforms the iOS SDK's NSError is mapped onto the closest FirebaseInAppMessagingDisplayCallbacks.InAppMessagingErrorReason: a failed image download is IMAGE_FETCH_ERROR, invalid image data IMAGE_DISPLAY_ERROR, and anything else UNSPECIFIED_RENDER_ERROR; the reason a display component set with setMessageDisplayComponent reports is kept as it is.
Does nothing: no message is displayed on the JVM.
Registers impressionListener, which is notified when a message has been displayed long enough to count as an impression; see addClickListener.
Registers impressionListener, which is notified when a message has been displayed long enough to count as an impression; see addClickListener.
Registers impressionListener, which is notified when a message has been displayed long enough to count as an impression; see addClickListener.
Does nothing: no message is displayed on the JVM.
Whether the display of messages is suppressed, see setMessagesSuppressed. 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.
Whether the display of messages is suppressed, see setMessagesSuppressed. 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.
Whether the display of messages is suppressed, see setMessagesSuppressed. 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.
Whether the display of messages is suppressed, see setMessagesSuppressed. 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.
Removes the display component, so that no message is displayed; the Android SDK's hidden clearDisplayListener(). On Android the display SDK binds its component again when an activity resumes. On Apple platforms this also removes the iOS SDK's default UI, which com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.getInstance brings back.
Removes the display component, so that no message is displayed; the Android SDK's hidden clearDisplayListener(). On Android the display SDK binds its component again when an activity resumes. On Apple platforms this also removes the iOS SDK's default UI, which com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.getInstance brings back.
Removes the display component, so that no message is displayed; the Android SDK's hidden clearDisplayListener(). On Android the display SDK binds its component again when an activity resumes. On Apple platforms this also removes the iOS SDK's default UI, which com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.getInstance brings back.
Removes the display component, so that no message is displayed; the Android SDK's hidden clearDisplayListener(). On Android the display SDK binds its component again when an activity resumes. On Apple platforms this also removes the iOS SDK's default UI, which com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.getInstance brings back.
Unregisters a listener registered with addClickListener.
Unregisters a listener registered with addClickListener.
Unregisters a listener registered with addClickListener.
Unregisters a listener registered with addClickListener.
Unregisters a listener registered with addDismissListener.
Unregisters a listener registered with addDismissListener.
Unregisters a listener registered with addDismissListener.
Unregisters a listener registered with addDismissListener.
Unregisters a listener registered with addDisplayErrorListener.
Unregisters a listener registered with addDisplayErrorListener.
Unregisters a listener registered with addDisplayErrorListener.
Unregisters a listener registered with addDisplayErrorListener.
Unregisters a listener registered with addImpressionListener.
Unregisters a listener registered with addImpressionListener.
Unregisters a listener registered with addImpressionListener.
Unregisters a listener registered with addImpressionListener.
Like setting isAutomaticDataCollectionEnabled, where 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.
null leaves the setting unchanged: the iOS SDK has no override to clear.
Like setting isAutomaticDataCollectionEnabled, where 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.
Kept in memory; null restores the default, true.
Makes messageDisplay render the messages, in place of the default UI. It must report what happens to the message through the FirebaseInAppMessagingDisplayCallbacks it is given, so that the SDK records the impression and click and moves on to the next message.
Sets the iOS SDK's messageDisplayComponent: the iOS SDK's own default UI for com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay (none on tvOS, which then displays nothing), or else a component that converts each message and calls messageDisplay on the main thread.
Makes messageDisplay render the messages, in place of the default UI. It must report what happens to the message through the FirebaseInAppMessagingDisplayCallbacks it is given, so that the SDK records the impression and click and moves on to the next message.
Does nothing: no message is displayed on the JVM.
Suppresses (or resumes) the display of messages, until the app restarts. The parameter is a boxed Boolean, as in the Android SDK; null is not allowed and throws a NullPointerException.
Suppresses (or resumes) the display of messages, until the app restarts. The parameter is a boxed Boolean, as in the Android SDK; null is not allowed and throws a NullPointerException.
Suppresses (or resumes) the display of messages, until the app restarts. The parameter is a boxed Boolean, as in the Android SDK; null is not allowed and throws a NullPointerException.
Suppresses (or resumes) the display of messages, until the app restarts. The parameter is a boxed Boolean, as in the Android SDK; null is not allowed and throws a NullPointerException.
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.
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.
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.
Does nothing: there are no campaigns on the JVM.