In-app message

Overview


In-app message is a banner that can be displayed when your app is running. It may have various layout variants, because it is fully customizable by HTML. The campaign is triggered and displayed depending on the configuration settings.

Read more about creating in-app messages here.

Configuration


In-app message campaigns are served by the Synerise backend.

Check possible available configuration options in the Settings.

Handling actions from in-app messages


Handling main actions from campaigns depends on the campaign type and operating system and it is described here.

Controlling behavior and actions


You may control an incoming in-app message and decide whether to show it. By default, the SDK allows in-app message display.

Also, you can be notified (in the form of events) about the campaign actions in the following cases:

  • When the in-app message is presented.
  • When the in-app message disappeared.
  • When additional context is needed to render the campaign.
  • When the customer invoked an action.

You can handle the message using:

See the following code samples:

public static OnInAppListener NULL = new OnInAppListener() {
  // This method is called after an in-app message is loaded and Synerise SDK asks for permission to show it.
  @Override
  public boolean shouldShow(InAppMessageData inAppMessageData) {
    return true;
  }

  // This method is called after an in-app message appears.
  @Override
  public void onShown(InAppMessageData inAppMessageData) {
    //...  
  }

  // This method is called after an in-app message disappears.
  @Override
  public void onDismissed(InAppMessageData inAppMessageData) {
    //...
  }

  // This method is called when a individual context for an in-app message is needed.
  @Override
  public HashMap<String, Object> onContextFromAppRequired(InAppMessageData inAppMessageData) {
    return new HashMap<>();
  }

  // This method is called when Synerise handles URL action from in-app messages.
  @Override
  public void onHandledOpenUrl(InAppMessageData inAppMessageData) {
    //...
  }

  // This method is called when Synerise handles deeplink action from in-app messages.
  @Override
  public void onHandledOpenDeepLink(InAppMessageData inAppMessageData) {
    //...
  }

  // This method is called when a custom action is handled from the in-app messages.
  @Override
  public void onCustomAction(String identifier, HashMap<String, Object> params, InAppMessageData inAppMessageData) {
    //...
  }
};
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker