How to ping website without waiting for a response ?
I use ping as background service, sample code in Ping Service module :
In Main module, i use this code to start Ping service :
The problem is when start Ping service, Main module is freezing because waiting response for Ping service.
I use ping as background service, sample code in Ping Service module :
B4X:
Dim SB As StringBuilder
SB.Initialize
PH.Shell("ping -c 1 www.google.com"),Null,SB,Null)
If SB.ToString="" Then
StatusPing="Failed"
Else
StatusPing="Success"
End If
In Main module, i use this code to start Ping service :
B4X:
StartService(PingService)
The problem is when start Ping service, Main module is freezing because waiting response for Ping service.