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);
Whether automatic data collection is enabled.
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);
Whether messages should be suppressed.
The Firebase In-App Messaging service interface.
Example
Get the In-App Messaging service for the default app: