Verifing if the internet is on

Vinians2006

Active Member
Licensed User
Longtime User
How can I verify if the internet is on and so tell the user to connect before a download for example?
Thanks
 

NJDude

Expert
Licensed User
Longtime User
You need to use the NETWORK library:
B4X:
Dim sSocket As ServerSocket

If sSocket.IsInitialized = False Then
  
   sSocket.Initialize(8080, "sSocket")
   sSocket.Close
       
End If

If sSocket.GetMyIP = "127.0.0.1" Then

    Msgbox("No Internet connection detected", "")
                
End If
 
Upvote 0
Top