To deliver personalized in-app messages that resonate with your users, you can configure them to appear only on specific app screens or within particular sections of a screen.
library_add_check |
Prerequisites This feature is available by default with In-App Nativ, version 3. It requires your app's SDK to be version 10.0.00 or later for Android, and version 6.0.0 or later for iOS. |
Configure In-App Messages for Specific App Contexts
MoEngage In-App messages allow you to specify exact locations within your app where messages display. This is useful when you want to target messages to specific sections of a screen (fragments) rather than entire screens (activities or view controllers). To set this up, follow these steps:
- In the MoEngage platform, navigate to the campaign creation page.
- Under Display Settings, locate the Show only in App Context box.
- Enter the desired app context or fragment names. This step is optional. If you do not want to restrict the message to specific app contexts, leave the Show only in App Context field blank.
Integrate App Contexts in Your Mobile App
To enable precise targeting of in-app messages by app context or fragment, your developers must implement specific SDK integration changes. This ensures the MoEngage SDK recognizes the defined contexts within your application.
Android Integration
MoEngage In-App messages rely on app contexts for display. If your Android app uses a single activity with multiple fragments, in-app messages might only appear when the app launches.
To gain more control over when messages display during the app's lifecycle (for example, at specific navigation points), refer to our Android Integration Document.
iOS Integration
MoEngage SDK version 6.0.0 and later supports context-based In-App messages.
When you create In-App campaigns in the MoEngage platform, you can specify contexts or tags for the campaign. The SDK checks the current app context and displays the In-App message only when it matches the campaign's context.
To implement this feature for your iOS app, refer to iOS Integration Document.