App.Online ni the new AB


Peter Bradstreet
Hi again,

Sorry to be a pest but it seems that every step of the conversion from old ab to new ab is a learning curve. In the app I need to know the online status of the user at various points throughout the app. In the old version I declared a variable and then referred to it:

Is there a Vue alternative to App.Online?

Pete

Samuel Vanneste
Hello Peter

According to W3C it should be You get a boolean.
And you are far from being a pest, I am as lost as you are with that new AB :)


Peter Bradstreet
Thanks Sam,

I see that there is also this: https://www.npmjs.com/package/v-offline . I will play with Navigator first though.

Pete

decsoft

Hello to all,

In addition to what Samuel suggest (thanks, sir!), if we plain to target Android, iOS, etc., we can use the Network Apache Cordova plugin, which is included out of the box.



Peter Bradstreet
So I do plan to target Android and IOS when I finally deploy the app but how do you test locally in the browser if you rely on the Apache Cordova plugin?

decsoft

Hello to all,

If we plain to target both Android and the browsers, then we must definetively do one thing in one platform and other thing in another platform, so use the Cordova plugin in Cordova platforms, and the browser stuff in the browser platform. There are ways to know if we are in one or another platform: not right now out of the box, but, it's possible by checking the existence of the "window.cordova" variable, for example. We can prepare an app function who tell us what we wanted, no matter in which platform we are.

Maybe we target Android and iOS, so Cordova platforms, but, not the browser, then maybe we no need to really use the browser stuff, but the referred possible app function can return certain specific value if the app is running in a browser (for testing purpose). That is, returns some "usable value", no matter if we are really online or not, reserving the "real value" when the app is running in the Cordova platforms. Both ways are possible, and, even when we don't have the right stuff (right now) out of the box, we can use the Javascript power (libraries, piece of code) all the time.

P.S. So, David, all the above to say that AB2 have nothing like "App.Online" right now? Well... I supose yes... that is, something like that (a method who returns "online" or "offline", no matter in which platform we are) can be expected in the future. Maybe what I want to say is that that is not a cause to stop our developing, there is not a problem to use any kind of Javascript stuff that can help us, instead we have another more direct method, to say like that.

In fact this is one of the best features of DecSoft App Builder: we are talking about a Javascript IDE, so almost all piece of Javascript is suitable to be used in our apps if needed, no matter if the IDE include it by default or not. :-)


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.

I agree. Hide this note. Give me more information.