Hello everyone ,
We can check internet is connected or not by network component .
But how can we check either the internet connection is working or not ?
Hello everyone ,
Just make a url connection to any page like google.com
If the response is okay (200) then you have a internet connection
You can call data from database backend your app. If data got then go next step. If data can’t get from database then you can show Dialog for net connection.
Thankyou soo much
I put in my application that if there is internet put a wifi icon and if there is no internet put the no wifi icon.
The blocks I use are those of the Network component.
When there is no internet automatically the component detects it and does what I put in the On.Disconnect event
It should have worked
use the Screen.ErrorOccured event to catch that error
You can try this method.
I think that doesn’t work, because you can’t get response without Internet connection.
Why not simply something like this:
or what @pepocero suggested.
what I do works for me perfect … the network component has those events for something hehe I as soon as I loose internet I see the icon of no wifi
unfortunately that does not help in this case.
I think that only check either internet is connected or not ,
But not internet has active connection or not.
You are getting this error because the Got Text event has not triggered because there is no internet connection. The “else” block will never work so simply use when Screen1.Error Occurred event to remove that error.
You can check this extension:
see the following link how to do it without using the Network component (which is not available in standard App Inventor) together with the Screen.ErrorOccurred event
Your Method Is Working
Thanks Again For Solving My Problem
I used this in an app I’m making and it works perfectly.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.