In the Android client I call
public void abortCurrentRequest() {
if(mCurrentRequest != null) {
mCurrentRequest.abort();
}
}
where mCurrentRequest is of type HttpPost.
However my PHP REST script still continues to run even though the request
was aborted. I have not turned on ignore_user_abort() in PHP and I have
also tried to connection_aborted() to detect if the request was aborted
without any success.
I have also tried changing the Android client to do this
mHttpClient.getConnectionManager().shutdown();
Once again the PHP REST script carries on. I need to be able to detect that
the current REST API was aborted. The API can take about 30 seconds to run
and if the user aborted it on the client, I want my PHP script to know
about it.
I am using Android 4.2.2 and PHP 5.4.12.
Any ideas? I do not want to introduce a new REST API to detect that the
user is cancelling. That seems very messy.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.