I have tested the bellow code with many real devices flawlessly, but it returned an error (check security) with HTC Desire 320 running 4.4.2, any advice?
B4X:
Dim p As Phone
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