Android Question Stopping a post request...

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody,
I have the last question for this year:
How can I stop the wait for a POST made on a HTTPJOB before it exit with a timeout.
I have two concurrent event I'm waiting for. The first is a simple timer, the second is the POST request. If the timer expires BEFORE the HTTP timeout I have both events (first the timer then HPPTJOB).
Any way to terminate the HTTPJOB wait after timer expires?

Thank you and Happy New Year

Mauro
 
The problem is that the timer stops a Activity, while the HTTPJOB event restarts it again, leaving the app in an unpredictable result. I have patched the App in this way: I wait till the HTTPJOB is succesfull and I start the timer. In case of HTTP timeout I don't start the timer. So I get no competion between the two events.
Thank you Erel: Always #1 ! You are better than wikipedia...
 
Upvote 0
Thank you Erel. To tell the truth, I have many post's and get's in the App handled in services... This is the last left in an activity.
The more I learn Android the more I use services... In the latest Apps there is most code in services .
 
Upvote 0
Back
Top