{"action":"created","issue":{"url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/65","labels_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/65/comments","events_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/65/events","html_url":"https://github.com/nordnet/cordova-hot-code-push/issues/65","id":121679886,"number":65,"title":"Autou download and install on app startup only","user":{"login":"ennisthemenace","id":15780932,"avatar_url":"https://avatars.githubusercontent.com/u/15780932?v=3","gravatar_id":"","url":"https://api.github.com/users/ennisthemenace","html_url":"https://github.com/ennisthemenace","followers_url":"https://api.github.com/users/ennisthemenace/followers","following_url":"https://api.github.com/users/ennisthemenace/following{/other_user}","gists_url":"https://api.github.com/users/ennisthemenace/gists{/gist_id}","starred_url":"https://api.github.com/users/ennisthemenace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ennisthemenace/subscriptions","organizations_url":"https://api.github.com/users/ennisthemenace/orgs","repos_url":"https://api.github.com/users/ennisthemenace/repos","events_url":"https://api.github.com/users/ennisthemenace/events{/privacy}","received_events_url":"https://api.github.com/users/ennisthemenace/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-11T10:20:35Z","updated_at":"2015-12-11T10:51:18Z","closed_at":null,"body":"Is there a way that the plugin can handle auto-download and auto-install off the updated files with on application start only? \r\n\r\nWhen I set \r\n<auto-download enabled=\"true\" />\r\n<auto-install enabled=\"true\" /> \r\n\r\nIt installs and restarts the application, and this isn't too good for my users. \r\n\r\nI can of course do all this programmatically through the chcp events but I would rather the plugin handled it completely since there is a possibility that an installed update would break the javascript and there for break my code that allows the application to update? \r\n\r\nDoes this make any sense? In short what would be great is a config param that set the plugin only to auto install when the application starts. "},"comment":{"url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/comments/163907593","html_url":"https://github.com/nordnet/cordova-hot-code-push/issues/65#issuecomment-163907593","issue_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/65","id":163907593,"user":{"login":"nikDemyankov","id":13447778,"avatar_url":"https://avatars.githubusercontent.com/u/13447778?v=3","gravatar_id":"","url":"https://api.github.com/users/nikDemyankov","html_url":"https://github.com/nikDemyankov","followers_url":"https://api.github.com/users/nikDemyankov/followers","following_url":"https://api.github.com/users/nikDemyankov/following{/other_user}","gists_url":"https://api.github.com/users/nikDemyankov/gists{/gist_id}","starred_url":"https://api.github.com/users/nikDemyankov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikDemyankov/subscriptions","organizations_url":"https://api.github.com/users/nikDemyankov/orgs","repos_url":"https://api.github.com/users/nikDemyankov/repos","events_url":"https://api.github.com/users/nikDemyankov/events{/privacy}","received_events_url":"https://api.github.com/users/nikDemyankov/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T10:51:17Z","updated_at":"2015-12-11T10:51:17Z","body":"If I understood you correctly - you can use `update` preference in the [application config](https://github.com/nordnet/cordova-hot-code-push#application-config), that is stored on the server. For example:\r\n```json\r\n{\r\n  \"content_url\": \"https://5027caf9.ngrok.com\",\r\n  \"release\": \"2015.09.01-13.30.35\",\r\n  \"update\": \"start\"\r\n}\r\n```\r\n\r\nThat way, you tell the plugin to install the update only when the app is launched. So, if update was loaded - it will be installed on the next launch."}}