{"_id":"57d53ee1496a3117004d70bf","project":"54861bb654b3ce0b00367292","category":{"_id":"57d52b5cf350090e00fe073e","__v":0,"version":"57b96d6b1d08500e00bf81d1","project":"54861bb654b3ce0b00367292","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-11T10:01:00.892Z","from_sync":false,"order":4,"slug":"android-app-triggers","title":"Android / App triggers"},"__v":0,"user":"548d74b716fc980b00e2a786","version":{"_id":"57b96d6b1d08500e00bf81d1","__v":7,"project":"54861bb654b3ce0b00367292","createdAt":"2016-08-21T08:59:23.326Z","releaseDate":"2016-08-21T08:59:23.326Z","categories":["57b96d6b1d08500e00bf81d2","57b96d6b1d08500e00bf81d3","57b96d6b1d08500e00bf81d4","57b96d6b1d08500e00bf81d5","57b96d6b1d08500e00bf81d6","57b96d6b1d08500e00bf81d7","57b96d6b1d08500e00bf81d8","57b96d6b1d08500e00bf81d9","57b96d6b1d08500e00bf81da","57b96d6b1d08500e00bf81db","57b96d6b1d08500e00bf81dc","57b97748306b9b0e001dd53f","57d12c6c1227b40e0044908a","57d51ad68191880e008bb51b","57d52b5cf350090e00fe073e","57d5468a17b492170053a3f0","57df9df05927cb0e002bce1e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"4.0.0","version":"4.0"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-11T11:24:17.108Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"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.setOnLaunchVersion(\\\"1.0\\\");\",\n      \"language\": \"java\"\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.setConnectionTimeout(20);\",\n      \"language\": \"java\"\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.setImageDownloadTimeout(5);\",\n      \"language\": \"java\"\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.setOfflineMode(false);\",\n      \"language\": \"java\"\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.setDisabledOnLaunch(false);\",\n      \"language\": \"java\"\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.setOnTimeoutDisableOnLaunch(false);\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"extra-session-settings-1","type":"basic","title":"Extra session settings"}

Extra session settings


ECSessionParams object has a "settings" property for defining the following pre defined settings: **On launch version** - version string for on launch moment [block:code] { "codes": [ { "code": "params.settings.setOnLaunchVersion(\"1.0\");", "language": "java" } ] } [/block] **Connection timeout** The maximum time the SDK awaits a response. Default value: 20 seconds Please see the fallback protocol here: [[Advanced] Response protocol](doc:advanced-response-protocol) [block:code] { "codes": [ { "code": "params.settings.setConnectionTimeout(20);", "language": "java" } ] } [/block] **Image connection timeout** The maximum time the SDK awaits image downloads. Default value: 5 seconds per Image The fallback protocol is displayed here: [[Advanced] Response protocol](doc:advanced-response-protocol) [block:code] { "codes": [ { "code": "params.settings.setImageDownloadTimeout(5);", "language": "java" } ] } [/block] **Offline mode** Offline 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) ) [block:callout] { "type": "danger", "title": "Please read before implementing:", "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." } [/block] [block:code] { "codes": [ { "code": "params.settings.setOfflineMode(false);", "language": "java" } ] } [/block] **Disable onboarding** You can disable On Launch moment all together via your code (you can also do it VIA the dashboard instead) [block:code] { "codes": [ { "code": "params.settings.setDisabledOnLaunch(false);", "language": "java" } ] } [/block] **Disable on Launch on timeout** Choose the following to disable offline onboarding after timeout. [block:callout] { "type": "info", "body": "Relevant only in case of an offline \"app launch moment\" on the device", "title": "When a local default experience is set" } [/block] [block:code] { "codes": [ { "code": "params.settings.setOnTimeoutDisableOnLaunch(false);", "language": "java" } ] } [/block]