{"action":"created","issue":{"url":"https://api.github.com/repos/jamielob/reloader/issues/3","repository_url":"https://api.github.com/repos/jamielob/reloader","labels_url":"https://api.github.com/repos/jamielob/reloader/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/jamielob/reloader/issues/3/comments","events_url":"https://api.github.com/repos/jamielob/reloader/issues/3/events","html_url":"https://github.com/jamielob/reloader/issues/3","id":150329358,"number":3,"title":"Question about Setup / can our requirements be solved with this package?","user":{"login":"DanielDornhardt","id":3845924,"avatar_url":"https://avatars.githubusercontent.com/u/3845924?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielDornhardt","html_url":"https://github.com/DanielDornhardt","followers_url":"https://api.github.com/users/DanielDornhardt/followers","following_url":"https://api.github.com/users/DanielDornhardt/following{/other_user}","gists_url":"https://api.github.com/users/DanielDornhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielDornhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielDornhardt/subscriptions","organizations_url":"https://api.github.com/users/DanielDornhardt/orgs","repos_url":"https://api.github.com/users/DanielDornhardt/repos","events_url":"https://api.github.com/users/DanielDornhardt/events{/privacy}","received_events_url":"https://api.github.com/users/DanielDornhardt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-22T10:10:06Z","updated_at":"2016-04-24T15:25:23Z","closed_at":"2016-04-24T15:25:23Z","body":"Hello,\r\n\r\nwe're developing a cool modern meteor-cordova-app (of course, why would we be here otherwise? :) ) and we're fine-tuning the startup experience at the moment.\r\n\r\nWhat we'd like to have the app behave like in the end is this:\r\n\r\n- First launch and any launch after more than 10 minutes of being in the background or not running: Show the splashscreen (so far, so good!) and **do the update while the splashscreen is still showing** - don't let the user start with a stale version if possible.\r\n- After launch: don't restart the app if the user switched away from the app for less than eg. 10 minutes.\r\n\r\nNote: All this is mainly tested on an LG G2 Android Device using the crosswalk package at the moment.\r\n\r\nAn example for the issue we're running into at the moment:\r\n- The user starts the app and sees a login screen\r\n- a release is detected / being loaded in the background\r\n- The user enters his username\r\n- The user might switch to another app to go read his password or something similar\r\n- The user comes back - and the app reloads. He needs to re-enter his username too.\r\n\r\nWe could mitigate the missing username in this case by storing the content in a more permanent spot, but this is just an example. At any point in the app the user could switch to another app and switch back a few seconds later.\r\n\r\nI thought that this would actually be solved by the default Reloader config: I interpreted (wished? it to be:) ) it as follows:\r\n\r\n    Reloader.configure({\r\n        check: 'everyStart', // Yes, that's cool, but only on \"real\" starts or after idleCutoff seconds?\r\n        checkTimer: 3000,  //3 seconds  // don't know what this is?\r\n        idleCutoff: 1000 * 60 * 10  //10 minutes  // only restart the app after more than 10 minutes have passed since the user navigated away from it\r\n    });\r\n\r\nThe behaviour we're observing at the moment (using the default options at the moment):\r\n\r\n- The app starts the first time. If an update is available, it won't be loaded immediately, the splashscreen will be hidden and the app will start running, but not with the latest version (`Reloader.updateAvailable.get()` will return `true` )\r\n- Going to the homescreen for a few seconds and returning will trigger a reload (splashscreen, reload of app)\r\n\r\nIs there a way to get it to work as we'd like it to using the configuration options provided?\r\n\r\nAlso, maybe some more explanation of what \"checkTimer\" and \"idleCutoff\" are doing (or should be doing? It doesn't really seem to wait for 10 minutes for me for the refresh when not in the app) would be helpful. If you can guide me to a better understanding, I'll gladly update the docs for you."},"comment":{"url":"https://api.github.com/repos/jamielob/reloader/issues/comments/213984035","html_url":"https://github.com/jamielob/reloader/issues/3#issuecomment-213984035","issue_url":"https://api.github.com/repos/jamielob/reloader/issues/3","id":213984035,"user":{"login":"jamielob","id":7291184,"avatar_url":"https://avatars.githubusercontent.com/u/7291184?v=3","gravatar_id":"","url":"https://api.github.com/users/jamielob","html_url":"https://github.com/jamielob","followers_url":"https://api.github.com/users/jamielob/followers","following_url":"https://api.github.com/users/jamielob/following{/other_user}","gists_url":"https://api.github.com/users/jamielob/gists{/gist_id}","starred_url":"https://api.github.com/users/jamielob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamielob/subscriptions","organizations_url":"https://api.github.com/users/jamielob/orgs","repos_url":"https://api.github.com/users/jamielob/repos","events_url":"https://api.github.com/users/jamielob/events{/privacy}","received_events_url":"https://api.github.com/users/jamielob/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T15:25:23Z","updated_at":"2016-04-24T15:25:23Z","body":"@DanielDornhardt - Absolutely correct!   And if it doesn't finish downloading until after the checkTimer has finished, it will simply be applied at the point you specify with the `refresh` option."}}