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
[[SailthruMobile 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
[[SailthruMobile new] setInAppNotificationsEnabled:YES];
// Disable in-app notifications
SailthruMobile().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
SailthruMobile().setInAppNotificationsEnabled(true)
// Disable in-app notifications
new SailthruMobile().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 SailthruMobile().setInAppNotificationsEnabled(true);
// Disable in-app notifications
SailthruMobile().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
SailthruMobile().setInAppNotificationsEnabled(true)

Did this page help you?