Android Question phone.shell Error

mrushdi

Member
Licensed User
Longtime User
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
 

mrushdi

Member
Licensed User
Longtime User
======= Response ========
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=68.1 ms
======= Error ===========
Check security
======================
 
Upvote 0

ronell

Well-Known Member
Licensed User
Longtime User
log on my device:
B4X:
======= Response ========
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=43 time=69.8 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt Min/avg/Max/mdev = 69.891/69.891/69.891/0.000 ms
======= Error ===========
======================

you tested it in many device so i think its not device issue , maybe location?
 
Upvote 0
Top