In-App SDK Integration

Prev Next

Overview

This page describes how to configure In-App Messaging for the Mapp Engage Android SDK v6.

It covers:

  • Required configuration parameters

  • In-App cache setup

  • Custom trigger events

  • Supported In-App message types

For general SDK setup and initialization, refer to Initialize the SDK (v6).


Configuring the Android SDK for In-App Cache Service

To enable In-App Messaging in the Mapp Engage Android SDK v6, you must configure the In-App cache service in your application.

This configuration connects your app to your Mapp Engage system and allows the SDK to retrieve and cache In-App messages.


Required Configuration Parameters

To configure the In-App cache service, the following parameters are required:

CEP_URL (Jamie URL)

The CEP_URL (also referred to in older documentation as the Jamie URL) is used by the SDK to cache and deliver In-App Messages.

This URL is specific to your Mapp Engage system environment and is provided during onboarding by your Mapp account manager or project manager.


SDK_KEY

The SDK_KEY is generated in the Mapp Engage Channel Management system.

Each app environment (for example, Android development and Android production) has a unique SDK Key.

You can find the SDK Key in: Administration > Channels


APP_ID

The APP_ID uniquely identifies your mobile application within Mapp Engage.

Each environment (development, production, etc.) has its own App ID.

The App ID is provided during onboarding and can also be found under: /


TENANT_ID (System ID)

The TENANT_ID identifies your Mapp Engage system (also historically referred to as the System ID).

It is provided during onboarding and is required to connect your app to the correct backend environment.


Google Project ID

The Google Project ID is the identifier of your Firebase project and is required for push messaging functionality.


Example Configuration in Android

Add the required values to your Android configuration file (for example, via buildConfigField):

buildConfigField "String", "APP_ID", "\"123456\""
buildConfigField "String", "CEP_URL", "\"https://jamie-test.shortest-route.com\""
buildConfigField "String", "TENANT_ID", "\"42\""

In-App Message Call (Custom Event Triggers)

Custom Trigger Events are used to determine when an In-App message is displayed. Common events include "Open App", "Open Shopping Cart", or "Open Inbox/Message Center." You can create app-specific events as well. At a minimum, all apps require one Custom Trigger Event (usually "Open App").

For versions 6.0.16+, the old syntax is deprecated. Use the following for custom events:

New Custom Trigger Event Syntax:

Appoxee.instance().triggerInApp(YourActivity.this, "EventName");

To use the custom event in an In-App message, call the registerAppEvents API to load all custom trigger events. Make sure you have an API user account set up in Mapp Engage. For further details, refer to Custom Event Triggers.


In-App Message Types

Fullscreen Message Type

This message type covers the entire screen and can be dismissed by:

  • Pressing the back button (Android)

  • Clicking the 'X' icon in the top right corner

Modal Message Type

Modal messages are displayed as popups, and they support the following screen orientations:

  • Portrait

  • Landscape

  • Reverse Portrait

  • Reverse Landscape

For all orientations, the modal is scaled based on the screen percentage and maintains a fixed resolution until dismissed. The orientation remains fixed until the modal is closed to avoid memory leaks.

Dismissal Options:

  • 'X' button (top-right corner)

  • Back press

  • Clicking outside the modal

  • Time-based auto-dismissal

Banner Message Type

Banner messages are displayed at the top or bottom of the screen and prevent the activity from being recreated. Add the following line in the Application's AndroidManifest.xml:

android:configChanges="...|orientation|..."

Dismissal Options:

  • 'X' button (top-right corner)

  • Time-based auto-dismissal