If I understand your question correctly, you already know how to abandon the task in n seconds, but you need to know IF it was left?
According to AsyncTask docs , it throws a TimeoutException.
Do something like:
try {
} catch(TimeoutException ex) {
}
source
share