{dialog.object}_getOnlineStatus Method




Returns true if the device has an internet connection. Returns false if there is no connection.

var flag = {dialog.Object}._getOnlineStatus();
The onConnectionChange client-side event fires when the connection state changes.

For testing how your component will behave when it is offline, you can simulate an offline condition and force the ._getOnlineStatus() method to return false even when you do have a connection by calling the {dialog.object}._setSimulatedOnlineStatus('off'); method.

(Android only) If you are building a Cordova application, be sure to include the 'Network Information' plugin in the 'Required Core Plugins' section in the Cordova Build Project Settings or else this method may always return true, regardless of the actual network status.

See Also