In-app Messaging

Deliver in-app messages to your app users triggered from any analytics data or event. After implementation, messages are delivered to the app dynamically without requiring a code update.

Requires SDK version 4.2 or later

Messages and the rules that define when messages are displayed are created in Adobe Mobile services. See Create an in-app message.

The updates described in this section must be made to the SDK to display in-app messages. You can complete these steps even if you do not have any messages defined yet. After you define messages, they will be delivered dynamically to your app and displayed without an app store update.

How to Enable

Prerequisites: Add the library to your project and implement lifecycle.

  1. Update AndroidManifest.xml to declare the full screen activity and enable the Message Notification Handler:

    android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    <;receiver android:name="" />

    If you select modal layout when you create a message in Adobe mobile services:

    You must also specify the theme for the message:

    android:windowSoftInputMode="adjustUnspecified|stateHidden" />
    <;receiver android:name="" />

    You can specify Theme.Translucent.NoTitleBar.Fullscreen, Theme.Translucent.NoTitleBar, or Theme.Translucent.

  2. Import the library:
  3. In each collectLifecycleData call, pass this to provide a reference to your current activity:
    public void onResume() {
  4. Verify that ADBMobileConfig.json contains the required settings for In-App messaging. Either messages or remotes is required. In order for in-app messages to be updated dynamically on launch, the remotes object must be present and properly configured:
    “messages”: [
            “messageId”: “de45c43c-37bf-441f-8cbd-cc3ba3469ebe”,
            “template”: “fullscreen”,
            “showOffline”: false,
            “showRule”: “always”,
            “endDate”: 2524730400,
            “startDate”: 0,
            “audiences”: [],
            “triggers”: [],
            “payload”: {	// contents change depending on template
                “html”: “<;html>html code goes here<;/html>”
    “remotes” : {
        “analytics.poi”: “…/yourfile.json”,
        “messages”: “…/yourfile.json”

    If these are not configured, download an updated ADBMobileConfig.json from Adobe Mobile services.

Local Fallback Image

When creating a full screen message in Adobe Mobile services, you can optionally specify a fallback image. In the case that your message is unable to retrieve its intended image from the web, the SDK attempts to load the image with the same name from your application’s assets folder. This allows you to show your message in its original form even if the user is offline or the predetermined image is unreachable.

The fallback image asset name is specified when configuring the message in Adobe Mobile services, you need to ensure the specified resource is available.

Configure Notification Icons

Two methods were added to let you configure the small and large icon that appears in the notification area, and the large icon that is displayed when notifications appear in the notification drawer.

Method Description
Config.setSmallIconResourceId(int resourceId)

Set the small icon that will be used for notifications created by the SDK. This icon will show up in the status bar. This will also be the secondary image shown when the user sees the full notification in the notification center.


public static void setSmallIconResourceId(final int resourceId);


Config.setLargeIconResourceId(int resourceId)

Set the large icon that will be used for notifications created by the SDK. This icon will be the primary image shown when the user sees the full notification in the notification center.


public static void setLargeIconResourceId(final int resourceId);



Parent topic: Messaging