I'm using
function Global_Events_OnStart(e) {
isNetworkUp = (Device.connectionType == 0);
}
to detect if network connected. At Home Screen's onShow event which hosts code to run Webclients:
function pgHome_Self_OnShow() {
if (isNetworkUp) {
wcPersonList.run(true); // async run
wcImages.run(true);
}else{
Dialogs.dlConnectionWarning.show();
}
}
Is this ok? Or should I add additional controls to Global Application.onError event?
With using isNetworkUp control you can use your own Error Dialog.
If you don't write any codeLines to detect that network is up or down,
It triggers Global_Events_OnError .
Global_Events_OnError is predefined function to detect any kind of error in your project.
Smartface.io Team