Java tutorial
//package com.java2s; /* * AsyncUtils.java: First version written on 16. Feb. 2011. * * This file is subject to the terms and conditions defined in * file 'licence.txt', which is part of this source code package. */ import android.os.AsyncTask; public class Main { /** * Null-ignoring <code>AsyncTask</code> status determining method. */ public static boolean isRunning(final AsyncTask<?, ?, ?> asyncTask) { return null != asyncTask && !AsyncTask.Status.FINISHED.equals(asyncTask.getStatus()); } }