In-App Customisation
A guide to the extended customisation options available for the out-of-the-box in-app message UI
Marigold can show an in-app message as a banner, a modal, or a full-screen detail. Use presentation settings to style the SDK’s UI, or use presentation callbacks to show your own view. You can style the popup and full-screen detail independently.
| SDK | Minimum version for these examples |
|---|---|
| iOS | 21.0.0 |
| Android | 28.0.0 |
React Native (react-native-marigold) | 20.0.0 |
Flutter (marigold_mobile_flutter_sdk) | 4.0.0 |
Start with the SDK integration guide if you haven’t installed and initialised Marigold.
Choose what to customise
| What you want to do | Where to set it |
|---|---|
| Set the default appearance for all messages | Set presentationDefaults in native iOS or Android code during app startup, before startEngine. This also works for React Native and Flutter apps. |
| Change the SDK’s appearance or behaviour for one message | Use a presentation callback and return display with a configuration. |
| Skip a presentation | Return suppress for that attempt. |
| Show a custom view you own | Show your view, return handled, and register its impression when visible. |
Set native app defaults if your styling needs to apply on launch before JavaScript or Dart starts.
For SDK-rendered UI, callback settings override app defaults field by field. Fields without an app setting use SDK defaults. If the callback selects a modal, unspecified fields use the modal defaults. Full-screen requests always use full-screen options.
When you register a presentation callback, the native SDK waits up to two seconds for a decision. The time includes delivery to JavaScript or Dart. An unanswered request falls back to SDK presentation using your app defaults. If you show custom UI, return handled promptly and load any extra data from the view afterward. A slow callback can continue after the SDK has started its fallback UI.
Style the SDK UI
Return display with a configuration to keep the SDK’s rendering, dismissal, and impression tracking. An in-app notification can appear as a banner or modal independently of a system push notification.
Style individual messages with callbacks
All four examples answer the same requests. They use a text-only bottom banner for notifications and show message content with a Read more button for detail. Each callback receives the message, so you can choose different settings for each request.
- iOS. Add the methods to your existing
MARMessageStreamDelegate, or register a new delegate withMARMessageStream.setDelegate. Keep a strong reference to it while it handles presentation. - Android. Register both preparation listeners during app setup.
- React Native. Call
useInAppPresentation()from your root component. Subscribe before enabling decisions and keep the listener active while the host can present messages. - Flutter. Call
configureInAppPresentation()when your app’s root can present messages. Register both callbacks in the same call.
import Foundation
import Marigold
final class InAppStyleDelegate: NSObject, MARMessageStreamDelegate {
func prepareInAppNotification(
for message: MARMessage,
requestID: String,
completion: @escaping (MARInAppPresentationDecision) -> Void
) {
let banner = MARInAppPresentationConfiguration.compactBanner()
banner.bannerPosition = .bottom
completion(.display(configuration: banner))
}
func prepareMessageDetail(
for message: MARMessage,
requestID: String,
completion: @escaping (MARInAppPresentationDecision) -> Void
) {
let detail = MARInAppPresentationConfiguration.contentFirstFullScreen()
detail.linkButtonTitle = "Read more"
completion(.display(configuration: detail))
}
}#import <Marigold/Marigold.h>
@interface InAppStyleDelegate : NSObject <MARMessageStreamDelegate>
@end
@implementation InAppStyleDelegate
- (void)prepareInAppNotificationForMessage:(MARMessage *)message
requestID:(NSString *)requestID
completion:(void (^)(MARInAppPresentationDecision *))completion {
MARInAppPresentationConfiguration *banner = [MARInAppPresentationConfiguration compactBanner];
banner.bannerPosition = MARInAppBannerPositionBottom;
completion([MARInAppPresentationDecision displayWithConfiguration:banner]);
}
- (void)prepareMessageDetailForMessage:(MARMessage *)message
requestID:(NSString *)requestID
completion:(void (^)(MARInAppPresentationDecision *))completion {
MARInAppPresentationConfiguration *detail = [MARInAppPresentationConfiguration contentFirstFullScreen];
detail.linkButtonTitle = @"Read more";
completion([MARInAppPresentationDecision displayWithConfiguration:detail]);
}
@endimport com.marigold.sdk.InAppPresentationConfiguration
import com.marigold.sdk.InAppPresentationDecision
import com.marigold.sdk.MessageStream
import com.marigold.sdk.enums.InAppBannerPosition
fun configureInAppPresentation() {
val stream = MessageStream()
stream.setInAppNotificationPreparationListener { _, _, reply ->
val banner = InAppPresentationConfiguration.compactBanner().apply {
bannerPosition = InAppBannerPosition.BOTTOM
}
reply.complete(InAppPresentationDecision.display(banner))
}
stream.setMessageDetailPreparationListener { _, _, reply ->
val detail = InAppPresentationConfiguration.contentFirstFullScreen().apply {
linkButtonTitle = "Read more"
}
reply.complete(InAppPresentationDecision.display(detail))
}
}import com.marigold.sdk.InAppPresentationConfiguration;
import com.marigold.sdk.InAppPresentationDecision;
import com.marigold.sdk.MessageStream;
import com.marigold.sdk.enums.InAppBannerPosition;
// In your application setup class.
void configureInAppPresentation() {
MessageStream stream = new MessageStream();
stream.setInAppNotificationPreparationListener((message, requestID, reply) -> {
InAppPresentationConfiguration banner = InAppPresentationConfiguration.compactBanner();
banner.setBannerPosition(InAppBannerPosition.BOTTOM);
reply.complete(InAppPresentationDecision.display(banner));
});
stream.setMessageDetailPreparationListener((message, requestID, reply) -> {
InAppPresentationConfiguration detail = InAppPresentationConfiguration.contentFirstFullScreen();
detail.setLinkButtonTitle("Read more");
reply.complete(InAppPresentationDecision.display(detail));
});
}import {useEffect} from 'react';
import {MessageStream} from 'react-native-marigold';
import type {InAppPresentationConfiguration} from 'react-native-marigold';
export function useInAppPresentation() {
useEffect(() => {
const subscription = MessageStream.onPresentationRequest(({kind, requestId}) => {
const configuration: InAppPresentationConfiguration = kind === 'notification'
? {
style: 'banner',
banner_position: 'bottom',
shows_image: false,
corner_radius: 12,
display_duration: 5,
}
: {
link_behavior: 'show_message_with_button',
link_button_title: 'Read more',
};
MessageStream.completePresentation(requestId, 'display', configuration);
});
MessageStream.setPresentationCallbacksEnabled(true, true);
return () => {
MessageStream.setPresentationCallbacksEnabled(false, false);
subscription.remove();
};
}, []);
}import 'package:marigold_mobile_flutter_sdk/marigold_mobile_flutter_sdk.dart';
Future<void> configureInAppPresentation() {
return MessageStream.setPresentationCallbacks(
notification: (message, requestId) =>
const InAppPresentationDecision.display(InAppPresentationConfiguration(
style: InAppPresentationStyle.banner,
bannerPosition: InAppBannerPosition.bottom,
showsImage: false,
cornerRadius: 12,
displayDuration: 5,
)),
detail: (message, requestId) =>
const InAppPresentationDecision.display(InAppPresentationConfiguration(
linkBehavior: InAppLinkBehavior.showMessageWithButton,
linkButtonTitle: 'Read more',
)),
);
}React Native and Flutter apps also need to configure Android push routing if push taps should use the detail callback.
Set app-wide defaults
Apply defaults from native iOS or Android code before startEngine. This also applies to the native hosts of React Native and Flutter apps. The SDK copies the defaults on assignment, so finish editing them before setting presentationDefaults.
import Marigold
func configureInAppDefaults() {
let defaults = MARInAppPresentationDefaults()
defaults.notificationStyle = .banner
let banner = MARInAppPresentationConfiguration.compactBanner()
banner.bannerPosition = .bottom
defaults.banner = banner
defaults.modal = MARInAppPresentationConfiguration.imageModal()
let detail = MARInAppPresentationConfiguration.contentFirstFullScreen()
detail.linkButtonTitle = "Read more"
defaults.fullScreen = detail
MARMessageStream().presentationDefaults = defaults
}#import <Marigold/Marigold.h>
void ConfigureInAppDefaults(void) {
MARInAppPresentationDefaults *defaults = [MARInAppPresentationDefaults new];
defaults.notificationStyle = MARInAppPresentationStyleBanner;
MARInAppPresentationConfiguration *banner = [MARInAppPresentationConfiguration compactBanner];
banner.bannerPosition = MARInAppBannerPositionBottom;
defaults.banner = banner;
defaults.modal = [MARInAppPresentationConfiguration imageModal];
MARInAppPresentationConfiguration *detail = [MARInAppPresentationConfiguration contentFirstFullScreen];
detail.linkButtonTitle = @"Read more";
defaults.fullScreen = detail;
[MARMessageStream new].presentationDefaults = defaults;
}import com.marigold.sdk.InAppPresentationConfiguration
import com.marigold.sdk.InAppPresentationDefaults
import com.marigold.sdk.MessageStream
import com.marigold.sdk.enums.InAppBannerPosition
import com.marigold.sdk.enums.InAppPresentationStyle
fun configureInAppDefaults() {
MessageStream().presentationDefaults = InAppPresentationDefaults(
notificationStyle = InAppPresentationStyle.BANNER,
banner = InAppPresentationConfiguration.compactBanner().apply {
bannerPosition = InAppBannerPosition.BOTTOM
},
modal = InAppPresentationConfiguration.imageModal(),
fullScreen = InAppPresentationConfiguration.contentFirstFullScreen().apply {
linkButtonTitle = "Read more"
},
)
}import com.marigold.sdk.InAppPresentationConfiguration;
import com.marigold.sdk.InAppPresentationDefaults;
import com.marigold.sdk.MessageStream;
import com.marigold.sdk.enums.InAppBannerPosition;
import com.marigold.sdk.enums.InAppPresentationStyle;
// In your application setup class.
void configureInAppDefaults() {
InAppPresentationDefaults defaults = new InAppPresentationDefaults();
defaults.setNotificationStyle(InAppPresentationStyle.BANNER);
InAppPresentationConfiguration banner = InAppPresentationConfiguration.compactBanner();
banner.setBannerPosition(InAppBannerPosition.BOTTOM);
defaults.setBanner(banner);
defaults.setModal(InAppPresentationConfiguration.imageModal());
InAppPresentationConfiguration detail = InAppPresentationConfiguration.contentFirstFullScreen();
detail.setLinkButtonTitle("Read more");
defaults.setFullScreen(detail);
new MessageStream().setPresentationDefaults(defaults);
}Banner and modal options
| Format | Examples of settings |
|---|---|
| Banner | Top or bottom position, image visibility, corner radius, spacing, fonts, and colours |
| Modal | Image fit, backdrop colour and opacity, corner radius, spacing, fonts, and colours |
| Both | Close button, dismissal gestures, and how long the popup stays visible. Use a duration of 0 for manual dismissal. |
Full-screen link behaviour
Full-screen settings style the native frame, title, and controls. Use the authored HTML to change the message content’s typography or layout.
For a campaign with a link, the link behaviour determines what the user sees first.
| Behaviour | What happens |
|---|---|
| Follow link | Use the SDK’s normal link handling. Web destinations open in the detail view, and app deep links open through the system. |
| Show message with button | Show the campaign content first, then offer a native button for the link. Set the label with linkButtonTitle on iOS, Android, and Flutter, or link_button_title on React Native. |
With content-first display, a message without a URL has no link button. If the service redirects instead of returning campaign content, the SDK follows the message link using its normal handling. Web links opened from the native button stay in the detail view. When authoring your own campaign HTML, use absolute HTTPS URLs for external assets and make the initial content work without JavaScript. The SDK disables JavaScript while showing content-first campaign HTML.
Colours and fonts
- Omit colours to inherit the SDK’s adaptive defaults. To supply separate light and dark colours, use a dynamic
UIColoron iOS,InAppPresentationColor(light, dark)on Android,{light: '#FFFFFF', dark: '#18232B'}in React Native, orInAppPresentationColor.dynamic(light: '#FFFFFF', dark: '#18232B')in Flutter. Wrapper colours accept#RRGGBBor#RRGGBBAA, with alpha last. - To use a bundled custom font by name, register an alias in native app startup code through
presentationFontsonMARMessageStreamorMessageStream. Map the alias to aUIFonton iOS or aTypefaceon Android. The same alias can be used in React Native’stitle_font: {size: 20, name: 'brand-heading'}or Flutter’stitleFont: InAppPresentationFont(size: 20, name: 'brand-heading'). Native code can also set fonts directly using aUIFonton iOS or anInAppPresentationFonton Android.
Open message detail
Detail can open from the message stream, an in-app notification, a system push associated with the message, or your own navigation. Call the SDK’s detail API from your message list or custom banner. Use a message retrieved from the SDK.
| SDK | Call |
|---|---|
| iOS (Swift) | MARMessageStream().presentMessageDetail(for: message) |
| iOS (Objective-C) | [[MARMessageStream new] presentMessageDetailForMessage:message] |
| Android (Kotlin) | MessageStream().presentMessageDetail(activity, message.messageID) from the main thread with the foreground Activity |
| Android (Java) | new MessageStream().presentMessageDetail(activity, message.getMessageID()) from the main thread with the foreground Activity |
| React Native | MessageStream.presentMessageDetail(message) |
| Flutter | await MessageStream.presentMessageDetail(message) |
These calls request presentation and give the detail callback a chance to decide how to handle it. On Android, the SDK leaves the host visible if the message cannot be loaded or the callback returns suppress or handled.
Show a custom notification
In these examples, showCampaignBanner is a function you provide. It returns true if your app takes ownership of the presentation, and calls onShown once the banner is visible. If your host can’t present it, return display to let the SDK show the message. Return suppress if you want to skip the attempt entirely.
Show app-owned UI and respond within the presentation deadline. For an impression to count, record it when the view appears. The SDK tracks impressions for the UI it renders.
- iOS. Add the method to your
MARMessageStreamDelegateand register it withMARMessageStream.setDelegate. Keep a strong reference to the delegate and use it for both popup and detail callbacks. - Android. Register the listener when your host can present. If it belongs to an Activity, retain it and call
removeInAppNotificationPreparationListener(listener)when the Activity is destroyed. - React Native. Call
useCampaignBanner()from your app root. The example enables one callback withtrue, false. If you also handle detail, handle both request kinds in the same listener and enable both flags. - Flutter. Call
configureCampaignBanner()when your host can present. If you also handle detail, pass both callbacks in the same call tosetPresentationCallbacks.
import Marigold
// Inside your MARMessageStreamDelegate implementation.
func prepareInAppNotification(
for message: MARMessage,
requestID: String,
completion: @escaping (MARInAppPresentationDecision) -> Void
) {
let shownByApp = showCampaignBanner(message, onShown: {
MARMessageStream().registerImpression(with: .inAppNotificationView, for: message)
})
completion(shownByApp ? .handled() : .display())
}#import <Marigold/Marigold.h>
// Inside your MARMessageStreamDelegate implementation.
- (void)prepareInAppNotificationForMessage:(MARMessage *)message
requestID:(NSString *)requestID
completion:(void (^)(MARInAppPresentationDecision *))completion {
BOOL shownByApp = [self showCampaignBanner:message onShown:^{
MARMessageStream *stream = [MARMessageStream new];
[stream registerImpressionWithType:MARImpressionTypeInAppNotificationView forMessage:message];
}];
completion(shownByApp ? [MARInAppPresentationDecision handled] : [MARInAppPresentationDecision display]);
}import com.marigold.sdk.InAppPresentationDecision
import com.marigold.sdk.MessageStream
import com.marigold.sdk.enums.ImpressionType
val stream = MessageStream()
val listener = MessageStream.OnInAppPresentationListener { message, _, reply ->
val shownByApp = showCampaignBanner(message) {
stream.registerMessageImpression(ImpressionType.IMPRESSION_TYPE_IN_APP_VIEW, message)
}
reply.complete(
if (shownByApp) InAppPresentationDecision.handled()
else InAppPresentationDecision.display()
)
}
stream.setInAppNotificationPreparationListener(listener)import com.marigold.sdk.InAppPresentationDecision;
import com.marigold.sdk.MessageStream;
import com.marigold.sdk.enums.ImpressionType;
// In your host class. Keep the returned listener if the host needs to remove it later.
MessageStream.OnInAppPresentationListener configureCampaignBanner() {
MessageStream stream = new MessageStream();
MessageStream.OnInAppPresentationListener listener = (message, requestID, reply) -> {
boolean shownByApp = showCampaignBanner(message, () -> {
stream.registerMessageImpression(ImpressionType.IMPRESSION_TYPE_IN_APP_VIEW, message);
});
reply.complete(shownByApp ? InAppPresentationDecision.handled() : InAppPresentationDecision.display());
};
stream.setInAppNotificationPreparationListener(listener);
return listener;
}import {useEffect} from 'react';
import {MessageStream} from 'react-native-marigold';
import type {Message} from 'react-native-marigold';
type ShowBanner = (message: Message, onShown: () => void) => boolean;
export function useCampaignBanner(showCampaignBanner: ShowBanner) {
useEffect(() => {
const subscription = MessageStream.onPresentationRequest(({kind, message, requestId}) => {
if (kind !== 'notification') return;
const shownByApp = showCampaignBanner(message, () => {
MessageStream.registerMessageImpression(MessageStream.MessageImpressionType.InAppView, message);
});
MessageStream.completePresentation(requestId, shownByApp ? 'handled' : 'display', null);
});
MessageStream.setPresentationCallbacksEnabled(true, false);
return () => {
MessageStream.setPresentationCallbacksEnabled(false, false);
subscription.remove();
};
}, [showCampaignBanner]);
}import 'package:marigold_mobile_flutter_sdk/marigold_mobile_flutter_sdk.dart';
typedef ShowBanner = bool Function(Message message, Future<void> Function() onShown);
Future<void> configureCampaignBanner(ShowBanner showCampaignBanner) {
return MessageStream.setPresentationCallbacks(
notification: (message, requestId) {
final shownByApp = showCampaignBanner(message, () =>
MessageStream.registerMessageImpression(message, ImpressionType.inAppNotificationView));
return shownByApp
? const InAppPresentationDecision.handled()
: const InAppPresentationDecision.display();
},
);
}To open detail from your custom banner, call the platform’s message detail API when the user taps it. This lets the detail callback or SDK handle the next presentation.
Show a custom detail screen
showCampaignDetail is a function you provide. It opens your screen, returns true when your app takes ownership, and calls onShown once the screen is visible. If the host can’t show the screen, return display for SDK UI or suppress to skip the attempt. Show the screen and return handled promptly, within the presentation deadline.
Register a detail view impression when your custom screen becomes visible. If opening your screen should also mark the message as read, call the SDK’s mark-as-read API at that point. For SDK-rendered detail, the SDK handles both.
- iOS. Add the method to your
MARMessageStreamDelegateand register it withMARMessageStream.setDelegate. Keep a strong reference to the delegate and use it for both popup and detail callbacks. - Android. Register the listener when your host can present. If it belongs to an Activity, retain it and call
removeMessageDetailPreparationListener(listener)when the Activity is destroyed. - React Native. Call
useCampaignDetail()from your app root. The example enables one callback withfalse, true. If you also handle popups, handle both request kinds in the same listener and enable both flags. - Flutter. Call
configureCampaignDetail()when your host can present. If you also handle popups, pass both callbacks in the same call tosetPresentationCallbacks.
import Marigold
// Inside your MARMessageStreamDelegate implementation.
func prepareMessageDetail(
for message: MARMessage,
requestID: String,
completion: @escaping (MARInAppPresentationDecision) -> Void
) {
let shownByApp = showCampaignDetail(message, onShown: {
let stream = MARMessageStream()
stream.registerImpression(with: .detailView, for: message)
stream.markMessage(asRead: message, withResponse: nil)
})
completion(shownByApp ? .handled() : .display())
}#import <Marigold/Marigold.h>
// Inside your MARMessageStreamDelegate implementation.
- (void)prepareMessageDetailForMessage:(MARMessage *)message
requestID:(NSString *)requestID
completion:(void (^)(MARInAppPresentationDecision *))completion {
BOOL shownByApp = [self showCampaignDetail:message onShown:^{
MARMessageStream *stream = [MARMessageStream new];
[stream registerImpressionWithType:MARImpressionTypeDetailView forMessage:message];
[stream markMessageAsRead:message withResponse:nil];
}];
completion(shownByApp ? [MARInAppPresentationDecision handled] : [MARInAppPresentationDecision display]);
}import com.marigold.sdk.InAppPresentationDecision
import com.marigold.sdk.MessageStream
import com.marigold.sdk.enums.ImpressionType
val stream = MessageStream()
val listener = MessageStream.OnInAppPresentationListener { message, _, reply ->
val shownByApp = showCampaignDetail(message) {
stream.registerMessageImpression(ImpressionType.IMPRESSION_TYPE_DETAIL_VIEW, message)
stream.setMessageRead(message, null)
}
reply.complete(
if (shownByApp) InAppPresentationDecision.handled()
else InAppPresentationDecision.display()
)
}
stream.setMessageDetailPreparationListener(listener)import com.marigold.sdk.InAppPresentationDecision;
import com.marigold.sdk.MessageStream;
import com.marigold.sdk.enums.ImpressionType;
// In your host class. Keep the returned listener if the host needs to remove it later.
MessageStream.OnInAppPresentationListener configureCampaignDetail() {
MessageStream stream = new MessageStream();
MessageStream.OnInAppPresentationListener listener = (message, requestID, reply) -> {
boolean shownByApp = showCampaignDetail(message, () -> {
stream.registerMessageImpression(ImpressionType.IMPRESSION_TYPE_DETAIL_VIEW, message);
stream.setMessageRead(message, null);
});
reply.complete(shownByApp ? InAppPresentationDecision.handled() : InAppPresentationDecision.display());
};
stream.setMessageDetailPreparationListener(listener);
return listener;
}import {useEffect} from 'react';
import {MessageStream} from 'react-native-marigold';
import type {Message} from 'react-native-marigold';
type ShowDetail = (message: Message, onShown: () => void) => boolean;
export function useCampaignDetail(showCampaignDetail: ShowDetail) {
useEffect(() => {
const subscription = MessageStream.onPresentationRequest(({kind, message, requestId}) => {
if (kind !== 'detail') return;
const shownByApp = showCampaignDetail(message, () => {
MessageStream.registerMessageImpression(MessageStream.MessageImpressionType.DetailView, message);
void MessageStream.markMessageAsRead(message);
});
MessageStream.completePresentation(requestId, shownByApp ? 'handled' : 'display', null);
});
MessageStream.setPresentationCallbacksEnabled(false, true);
return () => {
MessageStream.setPresentationCallbacksEnabled(false, false);
subscription.remove();
};
}, [showCampaignDetail]);
}import 'package:marigold_mobile_flutter_sdk/marigold_mobile_flutter_sdk.dart';
typedef ShowDetail = bool Function(Message message, Future<void> Function() onShown);
Future<void> configureCampaignDetail(ShowDetail showCampaignDetail) {
return MessageStream.setPresentationCallbacks(
detail: (message, requestId) {
final shownByApp = showCampaignDetail(message, () async {
await MessageStream.registerMessageImpression(message, ImpressionType.detailView);
await MessageStream.markMessageAsRead(message);
});
return shownByApp
? const InAppPresentationDecision.handled()
: const InAppPresentationDecision.display();
},
);
}Android push routing for React Native and Flutter
If a tap on a system push notification associated with an in-app message should reach your React Native or Flutter detail callback, route it through your app’s host Activity. This lets the wrapper wait for the Activity to resume and for the presentation callbacks to be configured, including on cold start. Use the helper for your wrapper in your Android application startup code, after startEngine.
import com.marigold.rnsdk.withHostFirstMessageDetail
import com.marigold.sdk.Marigold
import com.marigold.sdk.NotificationConfig
// In your Application setup, after starting Marigold.
val config = NotificationConfig().withHostFirstMessageDetail(MainActivity::class.java)
Marigold().setNotificationConfig(config)import com.marigold.rnsdk.NotificationConfigExtensions;
import com.marigold.sdk.Marigold;
import com.marigold.sdk.NotificationConfig;
// In your Application setup, after starting Marigold.
NotificationConfig config = NotificationConfigExtensions.withHostFirstMessageDetail(
new NotificationConfig(), MainActivity.class
);
new Marigold().setNotificationConfig(config);import com.marigold.sdk.Marigold
import com.marigold.sdk.NotificationConfig
import com.marigold.sdk.flutter.withHostFirstMessageDetail
// In your Application setup, after starting Marigold.
val config = NotificationConfig().withHostFirstMessageDetail(MainActivity::class.java)
Marigold().setNotificationConfig(config)import com.marigold.sdk.flutter.NotificationConfigExtensions;
import com.marigold.sdk.Marigold;
import com.marigold.sdk.NotificationConfig;
// In your Application setup, after starting Marigold.
NotificationConfig config = NotificationConfigExtensions.withHostFirstMessageDetail(
new NotificationConfig(), MainActivity.class
);
new Marigold().setNotificationConfig(config);For Flutter, the host must implement AndroidX LifecycleOwner. FlutterActivity and FlutterFragmentActivity already meet that requirement. For either wrapper, if your host overrides onNewIntent, call super.onNewIntent(intent) so an already-running app receives the tap.
Apply the helper to your existing NotificationConfig if you have other notification settings to preserve. The helper replaces any content intent builder previously registered on that config. Notifications without an in-app message keep their normal routing. Configure callbacks once your app can present detail, even if the SDK will render it. Call setPresentationCallbacksEnabled(false, false) in React Native or setPresentationCallbacks() in Flutter for that case. The iOS wrapper integrations use normal SDK push routing.
Migrate existing custom UI
| SDK | Update |
|---|---|
| iOS | Replace shouldPresentInAppNotificationForMessage: and shouldPresentMessageDetailForMessage: with the preparation methods. Use handled when your app shows a view and suppress when it skips the attempt. |
| Android | Replace setOnInAppNotificationDisplayListener with setInAppNotificationPreparationListener. For app-initiated detail, use MessageStream.presentMessageDetail and the detail preparation listener. Keep an explicit push destination if the notification should open a different app screen. |
| React Native | Replace useDefaultInAppNotification, onInAppNotification, and notifyInAppHandled with onPresentationRequest and completePresentation. Enable the callbacks you use. |
| Flutter | Register popup and detail decisions through setPresentationCallbacks. |
Updated 8 minutes ago
