{"_id":"588861fc165af631008ee218","category":{"_id":"588861fa165af631008ee1c0","project":"54861bb654b3ce0b00367292","__v":0,"version":"588861fa165af631008ee1b8","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-19T08:12:32.921Z","from_sync":false,"order":7,"slug":"cordova-app-triggers","title":"Cordova / App triggers"},"parentDoc":null,"__v":0,"version":{"_id":"588861fa165af631008ee1b8","__v":1,"project":"54861bb654b3ce0b00367292","createdAt":"2017-01-25T08:29:46.061Z","releaseDate":"2017-01-25T08:29:46.061Z","categories":["588861fa165af631008ee1b9","588861fa165af631008ee1ba","588861fa165af631008ee1bb","588861fa165af631008ee1bc","588861fa165af631008ee1bd","588861fa165af631008ee1be","588861fa165af631008ee1bf","588861fa165af631008ee1c0","588861fa165af631008ee1c1","588861fa165af631008ee1c2","588861fa165af631008ee1c3","588861fa165af631008ee1c4","588861fa165af631008ee1c5","588861fa165af631008ee1c6","588861fa165af631008ee1c7","588861fa165af631008ee1c8","588861fa165af631008ee1c9"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.0.0","version":"5.0"},"githubsync":"","project":"54861bb654b3ce0b00367292","user":"548d74b716fc980b00e2a786","metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-20T11:15:21.964Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":50,"body":"ECSessionParams object has a \"settings\" property for defining the following pre defined settings:\n\n**On launch version** - version string for on launch moment\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.settings.onLaunchVersion = \\\"1.0\\\";\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n**Connection timeout**\nThe maximum time the SDK awaits a response.\nDefault value: 20 seconds\n\nPlease see the fallback protocol here: [[Advanced] Response protocol](doc:advanced-response-protocol) \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.settings.connectionTimeout = 20;\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n**Image connection timeout**\nThe maximum time the SDK awaits image downloads.\nDefault value: 5 seconds per Image\n\nThe fallback protocol is displayed here: [[Advanced] Response protocol](doc:advanced-response-protocol) \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.settings.imageDownloadTimeout = 5;\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n**Offline mode**\nOffline mode allows you to build experiences and run them locally on your device without connecting to the Elasticode system. To get started, simply export the experiences to your device: [Export an Experience](doc:export-an-experience) )\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Please read before implementing:\",\n \"body\": \"After using this function, you will not be able to update/change/AB test/personalize in production until the next version is resubmitted to production and released.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.settings.offlineMode = false;\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n**Disable onboarding**\nYou can disable On Launch moment all together via your code (you can also do it VIA the dashboard instead) \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.settings.disabledOnLaunch = false;\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n**Disable on Launch on timeout**\nChoose the following to disable offline onboarding after timeout.\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"Relevant only in case of an offline \\\"app launch moment\\\" on the device\",\n \"title\": \"When a local default experience is set\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.settings.onTimeoutDisableOnLaunch = false;\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]","excerpt":"","slug":"extra-session-settings-2","type":"basic","title":"Extra session settings"}