{"_id":"5b720760c44b7600034b79e0","parentDoc":null,"category":{"_id":"5b720760c44b7600034b79ac","project":"55e67aaa9cc7c62b00c4a1ea","__v":0,"version":"5b720760c44b7600034b7a08","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-02-08T21:31:11.878Z","from_sync":false,"order":6,"slug":"advanced-techniques","title":"Advanced Techniques"},"user":"55d29988486de50d00327118","version":{"_id":"5b720760c44b7600034b7a08","project":"55e67aaa9cc7c62b00c4a1ea","__v":0,"forked_from":"5b1f2cbdfd653400031d8d9f","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["5b720760c44b7600034b79a7","5b720760c44b7600034b79a8","5b720760c44b7600034b79a9","5b720760c44b7600034b79aa","5b720760c44b7600034b79ab","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","5b720760c44b7600034b79ac","5b720760c44b7600034b79ad","5af0fe494ca2730003cbc98a","5af0fe55ec80af0003804ca2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"API V6","version_clean":"1.4.0","version":"1.4"},"githubsync":"","project":"55e67aaa9cc7c62b00c4a1ea","__v":3,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-20T15:38:14.479Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","apiSetting":null,"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"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.\n\nIn-app notifications can be delayed in the following way:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Disable in-app notifications\\n[Carnival setInAppNotificationsEnabled:NO]; // Call this before startEngine\\n\\n// Re-enable in-app notifications later when applicable\\n// Note: Failure to re-enable In-app notifications via this call \\n// will lead to in-app notifications never being displayed\\n[Carnival setInAppNotificationsEnabled:YES];\",\n      \"language\": \"objectivec\",\n      \"name\": \"iOS (Objective-C)\"\n    },\n    {\n      \"code\": \"// Disable in-app notifications\\nCarnival.setInAppNotificationsEnabled(false) // Call this before startEngine\\n\\n// Re-enable in-app notifications later when applicable\\n// Note: Failure to re-enable In-app notifications via this call \\n// will lead to in-app notifications never being displayed\\nCarnival.setInAppNotificationsEnabled(true)\",\n      \"language\": \"swift\",\n      \"name\": \"iOS (Swift)\"\n    },\n    {\n      \"code\": \"// Disable in-app notifications\\nCarnival.setInAppNotificationsEnabled(false); // Call this before startEngine\\n\\n// Re-enable in-app notifications later when applicable\\n// Note: Failure to re-enable In-app notifications via this call \\n// will lead to in-app notifications never being displayed\\nCarnival.setInAppNotificationsEnabled(true);\",\n      \"language\": \"java\",\n      \"name\": \"Android (Java)\"\n    },\n    {\n      \"code\": \"// Disable in-app notifications\\nCarnival.setDisplayInAppNotifications(false); // Call this before startEngine\\n\\n// Re-enable in-app notifications later when applicable\\n// Note: Failure to re-enable In-app notifications via this call \\n// will lead to in-app notifications never being displayed\\nCarnival.setDisplayInAppNotifications(true);\",\n      \"language\": \"javascript\",\n      \"name\": \"Cordova (JavaScript)\"\n    },\n    {\n      \"code\": \"// Disable in-app notifications\\nCarnival.SetInAppNotificationsEnabled(false); // Call this before startEngine\\n\\n// Re-enable in-app notifications later when applicable\\n// Note: Failure to re-enable In-app notifications via this call \\n// will lead to in-app notifications never being displayed\\nCarnival.SetInAppNotificationsEnabled(true);\",\n      \"language\": \"csharp\",\n      \"name\": \"Unity (C#)\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"delaying-in-app-notifications","type":"basic","title":"Delaying In App Notifications"}

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: [block:code] { "codes": [ { "code": "// Disable in-app notifications\n[Carnival setInAppNotificationsEnabled:NO]; // Call this before startEngine\n\n// Re-enable in-app notifications later when applicable\n// Note: Failure to re-enable In-app notifications via this call \n// will lead to in-app notifications never being displayed\n[Carnival setInAppNotificationsEnabled:YES];", "language": "objectivec", "name": "iOS (Objective-C)" }, { "code": "// Disable in-app notifications\nCarnival.setInAppNotificationsEnabled(false) // Call this before startEngine\n\n// Re-enable in-app notifications later when applicable\n// Note: Failure to re-enable In-app notifications via this call \n// will lead to in-app notifications never being displayed\nCarnival.setInAppNotificationsEnabled(true)", "language": "swift", "name": "iOS (Swift)" }, { "code": "// Disable in-app notifications\nCarnival.setInAppNotificationsEnabled(false); // Call this before startEngine\n\n// Re-enable in-app notifications later when applicable\n// Note: Failure to re-enable In-app notifications via this call \n// will lead to in-app notifications never being displayed\nCarnival.setInAppNotificationsEnabled(true);", "language": "java", "name": "Android (Java)" }, { "code": "// Disable in-app notifications\nCarnival.setDisplayInAppNotifications(false); // Call this before startEngine\n\n// Re-enable in-app notifications later when applicable\n// Note: Failure to re-enable In-app notifications via this call \n// will lead to in-app notifications never being displayed\nCarnival.setDisplayInAppNotifications(true);", "language": "javascript", "name": "Cordova (JavaScript)" }, { "code": "// Disable in-app notifications\nCarnival.SetInAppNotificationsEnabled(false); // Call this before startEngine\n\n// Re-enable in-app notifications later when applicable\n// Note: Failure to re-enable In-app notifications via this call \n// will lead to in-app notifications never being displayed\nCarnival.SetInAppNotificationsEnabled(true);", "language": "csharp", "name": "Unity (C#)" } ] } [/block]