public AsyncTask.Status getRetrieveAchievementsTaskStatus() { if (retrieveAchievementsTask != null) { return retrieveAchievementsTask.getStatus(); } else if (retrieveAchievementsTaskRunning == true) { return AsyncTask.Status.RUNNING; } else if (retrieveAchievementsTaskRunning == false) { return AsyncTask.Status.PENDING; } return AsyncTask.Status.FINISHED; }
public void executeRetrieveAchievementsTask() { RetrieveAchievementsTask task = new RetrieveAchievementsTask(); task.execute(); }
public void cancelRetrieveAchievementsTask() { if (retrieveAchievementsTask != null) { retrieveAchievementsTask.cancel(true); } retrieveAchievementsTaskRunning = false; }