Sub CheckConnection As Boolean
'Requires Phone Library
Dim p As Phone
Log(p.GetDataState)
Log(p.GetNetworkType)
Dim Response, Error As StringBuilder
Response.Initialize
Error.Initialize
'Ping Google DNS - if you can't reach this you are in serious trouble!
p.Shell("ping -c 1 8.8.8.8",Null,Response,Error)
Log("======= Response ========")
Log(Response)
Log("======= Error ===========")
Log(Error)
Log("======================")
If Error.ToString="" Then
Return True
Else
Return False
End If
End Sub