Delaying In App Notifications

You may want to disable in-app notifications on a login or onboarding screen. In-app notifications can be detrimental to the overall user experience or irrelevant when on such screens.

In-app notifications can be delayed in the following way:

// Disable in-app notifications
[[Marigold new] setInAppNotificationsEnabled:NO]; // Call this before startEngine

// Re-enable in-app notifications later when applicable
// Note: Failure to re-enable In-app notifications via this call 
// will lead to in-app notifications never being displayed
[[Marigold new] setInAppNotificationsEnabled:YES];
// Disable in-app notifications
Marigold().setInAppNotificationsEnabled(false) // Call this before startEngine

// Re-enable in-app notifications later when applicable
// Note: Failure to re-enable In-app notifications via this call 
// will lead to in-app notifications never being displayed
Marigold().setInAppNotificationsEnabled(true)
// Disable in-app notifications
new Marigold().setInAppNotificationsEnabled(false); // Call this before startEngine

// Re-enable in-app notifications later when applicable
// Note: Failure to re-enable In-app notifications via this call 
// will lead to in-app notifications never being displayed
new Marigold().setInAppNotificationsEnabled(true);
// Disable in-app notifications
Marigold().setInAppNotificationsEnabled(false) // Call this before startEngine

// Re-enable in-app notifications later when applicable
// Note: Failure to re-enable In-app notifications via this call 
// will lead to in-app notifications never being displayed
Marigold().setInAppNotificationsEnabled(true)

For the Unity SDK this can be achieved in the same way, but disabling the notifications must be handled natively as it must occur before startEngine is called. You can then later enable notifications through the wrapper SDK when you are ready to display them.

new Marigold().SetInAppNotificationsEnabled(true);