Hi guys
I need help to check internet connection is ON or OFF
I try eks.
But how to do it on application with label text ?
or Only to show msg when Internt is OFF, not each time we start app
I need help to check internet connection is ON or OFF
I try eks.
B4X:
If CheckConnection Then
Msgbox("You connected internet", "OK")
Else
Msgbox("You didn't connect internet", "Error")
End If
Sub CheckConnection As Boolean
Dim p As Phone
If (p.GetDataState == "CONNECTED") Then
Return True
End If
If (p.GetSettings ("wifi_on") == 1) Then
Return True
End If
If (p.GetDataState == "DISCONNECTED") Then
Return False
End If
If (p.GetDataState == "SUSPENDED") Then
Return False
End If
End Sub
But how to do it on application with label text ?
or Only to show msg when Internt is OFF, not each time we start app