{dialog.object}instantUpdateUseAutoUpdate Method
Syntax
{dialog.object}.instantUpdateUseAutoUpdate(flag);
Arguments
- flagboolean
Indicates if auto update should be enabled or disabled. A value of true enables auto update. false disables auto update.
Description
Enables or disables automatically checking for updates in a Cordova app that includes Instant Update.
Discussion
By default, if you build a Cordova App and you turn on the Instant Update feature, every time the App is launched in a device, the App will check if a new version is available. You can turn this default behavior off.
When you define your Cordova project, the Instant Update Settings dialog has a property called Automatically check for update when App is started. If you uncheck this property, the App will not check for a new version when it is started.
Use the {dialog.object}.instantUpdateRefresh() method to force a check for a new version at runtime.
You can toggle this setting on or off at run-time using this method. For example:
// Disable auto update: {dialog.object}.instantUpdateUseAutoUpdate(false); // Enable auto update: {dialog.object}.instantUpdateUseAutoUpdate(true);
Limitations
Cordova Applications with Instant Update Only
See Also