React Native Firebase
    Preparing search index...

    The Firebase In-App Messaging service interface.

    This module is available for the default app only.

    Get the In-App Messaging service for the default app:

    const defaultAppInAppMessaging = firebase.inAppMessaging();
    

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Enable or disable automatic data collection for Firebase In-App Messaging.

      When enabled, generates a registration token on app startup if there is no valid one and generates a new token when it is deleted (which prevents deleteInstanceId() from stopping the periodic sending of data).

      This setting is persisted across app restarts and overrides the setting specified in your manifest/plist file.

      // Disable data collection
      firebase.inAppMessaging().setAutomaticDataCollectionEnabled(false);

      Parameters

      • enabled: boolean

        Whether automatic data collection is enabled.

      Returns Promise<null>

    • Enable or disable suppression of Firebase In App Messaging messages.

      When enabled, no in app messages will be rendered until either you disable suppression, or the app restarts. This state is not persisted between app restarts.

      // Suppress messages
      await firebase.inAppMessaging().setMessagesDisplaySuppressed(true);

      Parameters

      • enabled: boolean

        Whether messages should be suppressed.

      Returns Promise<null>

    • Trigger in-app messages programmatically

      // Suppress messages
      await firebase.inAppMessaging().triggerEvent("exampleTrigger");

      Parameters

      • eventId: string

        The id of the event.

      Returns Promise<null>

    Properties

    The current FirebaseApp instance for this Firebase service.

    isAutomaticDataCollectionEnabled: boolean

    Determines whether automatic data collection is enabled or not.

    const isDataCollectionEnabled = firebase.inAppMessaging().isAutomaticDataCollectionEnabled;
    
    isMessagesDisplaySuppressed: boolean

    Determines whether messages are suppressed or not.

    const isSuppressed = firebase.inAppMessaging().isMessagesDisplaySuppressed;