In-App SDK Integration

Prev Next

Overview

This document outlines the steps to integrate the Android SDK to support In-App Messaging. For Inbox and In-App action handling, please refer to Android Inbox and In-App Action Handling.

In-App and Inbox Messaging for Mapp Cloud are available only with Android SDK v5.0+.

Configuring the Android SDK for In-App Cache Service

To enable the In-App Messaging cache service, you must configure the Android Configuration File for your application. This setup involves specifying the Jamie URL, derived from your Mapp Engage system ID (tenant ID), and your Google Project ID.

The Jamie URL is specific to the location of your Mapp Engage system. Your Mapp account manager or project manager will provide you with the following details during onboarding:

  • Jamie URL

  • System ID

  • App ID

  • SDK Keys

Required Data for Android Configuration File

  • CEP_URL (Jamie URL): This URL is used for caching and delivering In-App Messages. It will be provided by your Mapp Cloud account manager or project manager.

  • SDK_KEY: The SDK Key is generated in the Mapp Engage Channel Management system. Each app environment (e.g., Android development, Android production, iOS development, iOS production) has a unique SDK Key. You can find the SDK Key under Administration > Channels in Mapp Engage.

  • APP_ID: The App ID is the unique identifier for your application in Mapp Engage. Each app environment (e.g., Android development, Android production, iOS development, iOS production) will have a distinct App ID. This will be provided by your Mapp Cloud account manager or project manager and can also be found under Administration > Channels.

  • TENANT_ID: The Tenant ID is your Mapp Engage system ID, provided during onboarding.

  • Google Project ID: The ID associated with your Google Project.

Example Configuration in Android File:

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