{"category":{"version":"588861fa165af631008ee1b8","project":"54861bb654b3ce0b00367292","_id":"588861fa165af631008ee1bd","__v":0,"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"},"parentDoc":null,"project":"54861bb654b3ce0b00367292","user":"548d74b716fc980b00e2a786","version":{"__v":1,"_id":"588861fa165af631008ee1b8","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"},"_id":"588861fb165af631008ee20a","__v":0,"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":39,"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]