Hello Peter,
In certain app that I am developing for Android and iOS we use the Online / Offline event with good results. I think the description of the "App.Online" variable can be take as the best advise:
This variable store "true" if the app is considered online or "false" when not. Take also a look at the Online and Offline app events. This variable apparently do not work in the Cordova platform. If you plain to build your application with Apache Cordova, use the GetNetworkType action and the Network plugin for Apache Cordova.
Hello to all,
Certainly, a Timer control can be a solution. However, we have the "Online" and "Offline" app's events, and, also the "App.Online" variable. With this variable we can use an HTML markup like the below inside an HTML control:
Without doing anything else, when "App.Online" are "true", what we can see is the "Online" text, and, when "App.Online" become "false", what we can see is the "Offline" text.
On the other hand the app's Online and Offline events can be used anyway if we needed. That is, if we are using another control, not an HTML control, we can use that events in order to show or hide that control / indicator.
Hello Peter,
Maybe I am wrong, but, even when a Timer can be a solution... why not to use the solution proposed in my last post, that do not require a Timer at all? (I am curious... :)
Hello to all,
If you place the above HTML code inside an HTML control, you must see "Online" or "Offline", Peter, without doing anything else.
Hello to all,
You are right, Peter. Please, use the same HTML code than above, but, place this action in both Online and Offline app's events:
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.