{"__v":3,"_id":"564f3e66c133343500286ca0","category":{"project":"55e67aaa9cc7c62b00c4a1ea","version":"55e67aab9cc7c62b00c4a1ed","_id":"589b8e1fdbb7cd190026732c","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-02-08T21:31:11.878Z","from_sync":false,"order":6,"slug":"advanced-techniques","title":"Advanced Techniques"},"parentDoc":null,"project":"55e67aaa9cc7c62b00c4a1ea","user":"55d29988486de50d00327118","version":{"__v":10,"_id":"55e67aab9cc7c62b00c4a1ed","project":"55e67aaa9cc7c62b00c4a1ea","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["55e67aac9cc7c62b00c4a1ee","55e67b5556007d23005fee7d","55e67b5dde6fef23009480ca","55e680efde6fef23009480db","55e6829485a9741900314e99","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","589b8e1fdbb7cd190026732c","58b8ca5e3265d70f001788d4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-20T15:38:14.479Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"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]