Table of Contents

Class FirebaseInAppMessagingModule

Namespace
Titipi.MocaLib

Receives Firebase In-App Messaging campaigns via a native Android AAR plugin and dispatches them to game-side handlers. Image campaigns are also downloaded to local storage and cleaned up when their duration expires.

public static class FirebaseInAppMessagingModule
Inheritance
FirebaseInAppMessagingModule
Inherited Members

Properties

IsInitialized

Whether the module has been successfully initialized.

Initialization

Initialize()

Creates the MonoBehaviour runner (the UnitySendMessage target), initializes the native Android FIAM plugin, and ensures the campaign media directory exists.

Methods

LoadCampaigns()

Loads stored image campaigns from local JSON, filters out any whose duration has expired, and deletes the associated media files for expired campaigns.

OnCloseClick()

Notifies the native plugin that the user dismissed the popup. Called by FIAMPopupUI after the game's action handler runs. No-op in the Editor.

OnOkClick()

Notifies the native Android plugin that the user tapped the OK button. Called by FIAMPopupUI after the game's action handler runs. No-op on non-Android or in the Editor.

RegisterBannerMessageReceivedEvent(Action<FIAMBannerMessage>)

Subscribes callback to banner message events.

RegisterPopupHandler(IFIAMPopupHandler)

Registers handler to receive and handle all popup messages (Modal and Image). Subscribes to OnModalMessageReceived and OnImageMessageReceived.

SaveCampaigns(List<FIAMImageMessage>)

Persists the given campaign list to local JSON storage.

Events

OnBannerMessageReceived

Fired when a Banner in-app message is received from Firebase.

OnImageMessageReceived

Fired when an Image in-app message is received from Firebase.

OnModalMessageReceived

Fired when a Modal (text) in-app message is received from Firebase.