ensureSubscribedToInAppMessageEvents

open fun ensureSubscribedToInAppMessageEvents(context: Context)

Ensures the InAppMessageManager is subscribed in-app message events if not already subscribed. Before this method gets called, the InAppMessageManager is not subscribed to in-app message events and cannot display them. Every call to registerInAppMessageManager() calls this method.

If events with triggers are logged before the first call to registerInAppMessageManager(), then the corresponding in-app message won't display. Thus, if logging events with triggers before the first call to registerInAppMessageManager(), then call this method to ensure that in-app message events are correctly handled by the BrazeInAppMessageManager. For example, if logging custom events with triggers in your first activity's onCreate(), be sure to call this method manually beforehand so that the in-app message will get displayed by the time registerInAppMessageManager() gets called.

Parameters

context

The application context