Android Question WaitForInternet - Best way to check the internet connection

Sandman

Expert
Licensed User
Longtime User
It's a bit difficult to understand what you want, but I can at least tell you that visualnet.inf.br doesn't resolve. Which obviously means it's not reachable by anyone on the internet.
Bash:
curl https://visualnet.inf.br/store
curl: (6) Could not resolve host: visualnet.inf.br
 
Upvote 0

Pathrose

Member
Licensed User
It's a bit difficult to understand what you want, but I can at least tell you that visualnet.inf.br doesn't resolve. Which obviously means it's not reachable by anyone on the internet.
Bash:
curl https://visualnet.inf.br/store
curl: (6) Could not resolve host: visualnet.inf.br
Hi,
My question is regarding the below url
Any experience in using on the later versions of android
Also using this library does it drain bayttery ?
Regards
 
Upvote 0

Pathrose

Member
Licensed User
The best way is to make the specific request and do whatever you need to do if it fails.
Thanks Erel,
What I want is to resend a failed request from a service module as soon as the user turns on the internet
Please help with the best way
Regards
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
What I want is to resend a failed request from a service module as soon as the user turns on the internet
The best way is to make the specific request and do whatever you need to do if it fails.
 
Upvote 0

Highwinder

Active Member
Licensed User
Longtime User
Hi , Just wanted to know if this library is active..
Check my Library Store: http://visualnet.inf.br/store ....... shows server error
Thanks

I know I'm late here, but checking for internet is really easy, doesn't really require any special libraries. Just throw a ping to 8.8.8.8 (Google's permanent DNS server). Very reliable, works great, very simple. Only libraries I'm using are Core and Phone. Here's my code, works very well in the app I wrote in B4a v8.8, but there are many code examples on here that use this similar approach to pinging Google's 8.8.8.8:

In Process Globals:
Dim SB as StringBuilder

in Globals:
' Show main menu only if internet connectivity test successful, otherwise ExitApplication
SB.Initialize
If Ping("8.8.8.8", "Status", 5, 10, True) = "Offline" Then
Msgbox("No active internet connection detected. Turn off airplane mode if enabled, otherwise check cell data service or WiFi connectivity.","Connection Failed")
ExitApplication
Else
blOnlineCheckPassed = True ' my own variable used elsewhere
StartActivity(tocmenu)
' Close this screen
Activity.Finish
End If
 
Upvote 0
Top