Well i know that... but sometimes not "really" working... keep trying to load and not returning.. to the next lineHow to treat httpjob timeout?
I want to detect a timeout with httpjob. I'm doing this: Dim Job1 As HttpJob Job1.Initialize(...) Job1.Poststring(...) Job1.GetRequest.Timeout =5000 ' 5 seconds Wait For (j) JobDone(j As HttpJob) If j.Success Then Log("succes") Else Log("failed") End If When I start my app without internet...www.b4x.com
I only use httpjob with b4xpages... and runs at foreground...From that log entry, it seems to suggest that the httpjob is within an inactive activity, so it may not run as expected.
Try moving the httpjob code to a service that will stay running.
Do you want to wait for timeout and then do something? timeout will return false.Well i know that... but sometimes not "really" working... keep trying to load and not returning.. to the next line
No I want wait for example only 5 or 10 seconds - no more... but the problem is not that...Do you want to wait for timeout and then do something? timeout will return false.
hmmm, this is also seems right..Maybe httputils2service is not initialized. Try https://www.b4x.com/android/forum/t...time-depending-on-devices.149846/#post-949813