Mauro, do you want to check Internet connection, is that correct?
B4X:
Dim Phone As Phone
Dim server As ServerSocket
If server.GetMyWifiIP == "127.0.0.1" Then ' IF WIFI IS NOT CONNECTED
If(Phone.GetDataState = = "DISCONNECTED" OR Phone.GetDataState == "SUSPENDED" OR Phone.IsAirplaneModeOn = = True) Then ' IF MOBILE DATA IS OFF
Log("No Internet connection")
Else ' IF MOBILE DATA IS ON
Log("Internet connection available")
End If
Else ' IF WIFI IS CONNECTED
Log("Wifi is ON")
End If
Hi Mitobobo, I have written a library to achieve the result. I allows you to get the quality of connection. I put on the forum if you need it.
But anyway thank you very much for your time! And kindness too...
Yes, as far as I remember. It comunicates the instant type of connection, coded as a string according phone's firmware or WIFI if it's connected on that network...
A single call haveNetworkType reports networktype