In B4XPage, I found these two ways to detect if there is an Internet connection. The problem, both are only for Android. "PhoneEvents" does not exist in the internal iPhone library or possibly I did not find it
[CODE lang="b4x" title="Easy way"]Sub Class_Globals
Private pEvents As PhoneEvents
End Sub
Public Sub Initialize
pEvents.Initialize("PhoneStatus")
End Sub
Private Sub PhoneStatus_ConnectivityChanged (NetworkType As String, State As String, Intent As Intent)
If State = "CONNECTED" Then
'Code
Else If State <> "CONNECTED" Then
'Code
End If
End Sub[/CODE]
This library
Hi all, With this library you will have the following possibility. Currently version v1.5 (2021/05/23) 1️. Check the status of the airplane mode 2. Check internet connection status 3. Check the roaming status of the device 4. Check VPN connection status 5. Check Data State status 6. Get the...
www.b4x.com