Public Sub CheckConnection As Boolean
Dim ph As Phone
Dim Strvalue As String
Dim CurValue As Int
Try
Dim myLAN As ServerSocket
If ph.GetDataState <> "CONNECTED" AND myLAN.GetMyIP = "127.0.0.1" Then
'Looks like we do not have a internet connection.
'Run your code here when there is no connection
Else
'ok we are connected. Run your code to do what needs to be done when there is a internet connection
End If
Catch
Log ("Error in Check connnection sub in Checkstat service")
Return
End Try
End Sub