You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2018. It is now read-only.
Hi, I've disabled auto-install and auto-download in config.xml.
But it seems to be ignored on first run (right after install).
App get stuck on update, and it has to be closed and reopened. On second and all others run, everything is fine.
I have preloader index.html page, which sets things up and redirects to an app.html page.
So basically I'm listening on deviceready event and do chcp update checks.
In my app, I was expecting console logs to be in following order:
Device is ready
Plugin configured successfully
update is ready
But actually on first run I see:
Device is ready
update is ready
function onUpdateReady () {
console.log('update is ready');
//this should be called only after chcp.fetchUpdate(fetchUpdateCallback);
}
function onDeviceReady () {
console.log('Device is ready');
var options = {
'auto-download': false,
'auto-install': false
};
chcp.configure(options, configureCallback);
}
function configureCallback (error) {
if (error) {
console.log('Error during the configuration process');
console.log(error.description);
init();
} else {
console.log('Plugin configured successfully');
// from this moment only we control when to download and install new releases
chcp.fetchUpdate(fetchUpdateCallback);
}
}
function fetchUpdateCallback (error, data) {
if (error) {
console.log('Failed to load the update with error code: ' + error.code);
console.log(error.description);
init();
return;
} else {
console.log('Update is loaded, running the installation');
chcp.installUpdate(installationCallback);
}
}
function installationCallback (error) {
if (error) {
console.log('Failed to install the update with error code: ' + error.code);
console.log(error.description);
} else {
console.log('Update installed!');
}
init();
}
function init () {
window.document.location = 'mobile.html';
}
document.addEventListener('deviceready', onDeviceReady, false);
document.addEventListener('chcp_updateIsReadyToInstall', onUpdateReady, false);
Hi, I've disabled auto-install and auto-download in config.xml.
But it seems to be ignored on first run (right after install).
App get stuck on update, and it has to be closed and reopened. On second and all others run, everything is fine.
I have preloader index.html page, which sets things up and redirects to an app.html page.
So basically I'm listening on deviceready event and do chcp update checks.
In my app, I was expecting console logs to be in following order:
But actually on first run I see: