> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Contextual In-App Messages

> Configure MoEngage in-app messages to appear on specific screens or fragments within your app for more targeted and contextual user engagement.

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.

<Tip>
  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.
</Tip>

## 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:

1. In the MoEngage platform, navigate to the campaign creation page.
2. Under **Display Settings**, locate the **Show only in App Context** box.

   <img alt="DisplaySettings.png" src="https://mintcdn.com/moengage/OQ0V9ibjQLpsyCSD/images/moengage_0efdca.png?fit=max&auto=format&n=OQ0V9ibjQLpsyCSD&q=85&s=ea568646dbc72b5ab3e76ff07e686d18" width="556" height="448" data-path="images/moengage_0efdca.png" />
3. 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](/developer-guide/android-sdk/in-app-messages/in-app-nativ).

### 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](/developer-guide/ios-sdk/in-app-messages/in-app-nativ).
